Skip to content

Commit

Permalink
only superusers allowed to view user profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatov committed Jul 14, 2011
1 parent b08b58c commit 532e425
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ object ProfileStuff extends Loc[ProfileLoc] {
/** Rewrite location. */
override val rewrite: LocRewrite = Full(NamedPF("Profile Rewrite") {
case RewriteRequest(ParsePath("profile" :: username :: Nil, _, _, _), _, _)
if (!User.find(By(User.userName, username)).isEmpty) =>
if (User.superUser_? && !User.find(By(User.userName, username)).isEmpty) =>
(RewriteResponse("profile" :: Nil, Map("username" -> username)), ProfileLoc())
})
}

0 comments on commit 532e425

Please sign in to comment.