1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-31 06:14:50 +09:00

Add project role op for opening tickets, require it for opening a ticket

Before that only the project's sharer was authorized to open a ticket. Now
everyone can, once given a role with the op.
This commit is contained in:
fr33domlover 2018-05-26 06:59:54 +00:00
parent 26c3dc1731
commit 5c12e7c34f
2 changed files with 5 additions and 4 deletions

View file

@ -194,8 +194,8 @@ instance Yesod App where
(WorkflowEnumCtorNewR shr _ _ , _ ) -> personOrGroupAdmin shr (WorkflowEnumCtorNewR shr _ _ , _ ) -> personOrGroupAdmin shr
(WorkflowEnumCtorR shr _ _ _ , _ ) -> personOrGroupAdmin shr (WorkflowEnumCtorR shr _ _ _ , _ ) -> personOrGroupAdmin shr
(TicketsR shar _ , True) -> person shar (TicketsR s j , True) -> projOp ProjOpOpenTicket s j
(TicketNewR _ _ , _ ) -> personAny (TicketNewR s j , _ ) -> projOp ProjOpOpenTicket s j
(TicketR user _ _ , True) -> person user (TicketR user _ _ , True) -> person user
(TicketEditR user _ _ , _ ) -> person user (TicketEditR user _ _ , _ ) -> person user
(TicketAcceptR s j _ , _ ) -> projOp ProjOpAcceptTicket s j (TicketAcceptR s j _ , _ ) -> projOp ProjOpAcceptTicket s j

View file

@ -1,6 +1,6 @@
{- This file is part of Vervis. {- This file is part of Vervis.
- -
- Written in 2016 by fr33domlover <fr33domlover@riseup.net>. - Written in 2016, 2018 by fr33domlover <fr33domlover@riseup.net>.
- -
- Copying is an act of love. Please copy, reuse and share. - Copying is an act of love. Please copy, reuse and share.
- -
@ -28,7 +28,8 @@ data RepoOperation = RepoOpPush deriving (Eq, Show, Read, Enum, Bounded)
derivePersistField "RepoOperation" derivePersistField "RepoOperation"
data ProjectOperation data ProjectOperation
= ProjOpAcceptTicket = ProjOpOpenTicket
| ProjOpAcceptTicket
| ProjOpCloseTicket | ProjOpCloseTicket
| ProjOpReopenTicket | ProjOpReopenTicket
| ProjOpRequestTicket | ProjOpRequestTicket