mirror of
https://code.naskya.net/repos/ndqEd
synced 2025-01-10 17:16:47 +09:00
Add missing routes to isAuthorized
This commit is contained in:
parent
29cf2f853b
commit
e2ef279515
1 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue