Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ne plus permettre aux super-admins de se propager (#4227)
* Ne plus permettre aux super-admins de se propager * Please rubocop
- Loading branch information
1 parent
874c4dd
commit 1b02620
Showing
4 changed files
with
7 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,4 @@ | ||
class SuperAdmin::SuperAdminPolicy < DefaultSuperAdminPolicy | ||
def privileges_for_record? | ||
legacy_admin_member? || (record.support_member? && support_member?) | ||
end | ||
|
||
alias index? team_member? | ||
alias show? team_member? | ||
alias new? team_member? | ||
alias create? privileges_for_record? | ||
alias edit? privileges_for_record? | ||
alias update? privileges_for_record? | ||
alias destroy? privileges_for_record? | ||
alias destroy? team_member? | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters