Skip to content

Commit 5329594

Browse files
authored
Check authorisation (#1111)
1 parent 1daad17 commit 5329594

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Distribution/Server/Features/UserDetails.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ userDetailsFeature templates userDetailsState UserFeature{..} CoreFeature{..} Up
330330
handlerGetUserNameContactHtml :: DynamicPath -> ServerPartE Response
331331
handlerGetUserNameContactHtml dpath = do
332332
(uid, uinfo) <- lookupUserNameFull =<< userNameInPath dpath
333+
guardAuthorised_ [IsUserId uid, InGroup adminGroup]
333334
template <- getTemplate templates "user-details-form.html"
334335
udetails <- queryUserDetails uid
335336
showConfirmationOfSave <- not . null <$> queryString (lookBSs "showConfirmationOfSave")

0 commit comments

Comments
 (0)