Skip to content

Commit

Permalink
Take advantage of the User info available to the templates
Browse files Browse the repository at this point in the history
  • Loading branch information
lmarkus committed Dec 31, 2013
1 parent 4a3e32d commit db93989
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions public/templates/layouts/master.dust
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<li><a href="/">Home</a></li>
<li><a href="/profile">Profile</a></li>
<li><a href="/admin">Admin</a></li>
{?user}
<li><a href="/logout">Logout ( {user.name} ) </a></li>
{:else}
<li><a href="/login">Log In</a></li>
{/user}
</ul>
</nav>
</div>
Expand Down
2 changes: 1 addition & 1 deletion public/templates/profile.dust
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

{<body}
<h1>{@pre type="content" key="greeting"/}</h1>
<p>This is the user profile page</p>
<p>You are <strong>{user.name}</strong> and your role is <strong>{user.role}</strong></p>
{/body}

0 comments on commit db93989

Please sign in to comment.