1
0
Fork 0
mirror of https://code.naskya.net/repos/ndqEd synced 2025-01-10 17:06:47 +09:00

Add missing routes to isAuthorized

This commit is contained in:
fr33domlover 2016-05-25 22:38:21 +00:00
parent 29cf2f853b
commit e2ef279515

View file

@ -119,16 +119,24 @@ instance Yesod App where
isAuthorized r w = case (r, w) of
(GroupsR , True) -> loggedIn
(GroupNewR , _) -> loggedIn
(ProjectNewR user , _) -> loggedInAs user
(RepoNewR user , _) -> loggedInAs user
(KeysR , _) -> loggedIn
(KeyR _key , _) -> loggedIn
(KeyNewR , _) -> loggedIn
(ReposR shar , True) -> loggedInAs shar
(RepoNewR user , _) -> loggedInAs user
(RepoR shar _ , True) -> loggedInAs shar
(ProjectsR shar , True) -> loggedInAs shar
(ProjectNewR user , _) -> loggedInAs user
(TicketsR shar _ , True) -> loggedInAs shar
(TicketNewR _ _ , _) -> loggedIn
(TicketR user _ _ , True) -> loggedInAs user
(TicketEditR user _ _ , _) -> loggedInAs user
(TicketDiscussionR _ _ _ , True) -> loggedIn
(TicketMessageR _ _ _ _ , True) -> loggedIn
(TicketTopReplyR _ _ _ , _) -> loggedIn
(TicketReplyR _ _ _ _ , _) -> loggedIn
_ -> return Authorized