-
-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d847305
commit 51409f0
Showing
3 changed files
with
15 additions
and
19 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,15 +1,8 @@ | ||
# TODO: I have no clue what the policy should be | ||
class ContactTopicPolicy < ApplicationPolicy | ||
class Scope < Scope | ||
def resolve | ||
scope.all | ||
end | ||
end | ||
|
||
alias_method :create?, :is_admin? | ||
alias_method :destroy?, :is_admin? | ||
alias_method :edit?, :is_admin? | ||
alias_method :new?, :is_admin? | ||
alias_method :show?, :is_admin? | ||
alias_method :update?, :is_admin? | ||
alias_method :create?, :is_admin_same_org? | ||
alias_method :destroy?, :is_admin_same_org? | ||
alias_method :edit?, :is_admin_same_org? | ||
alias_method :new?, :is_admin_same_org? | ||
alias_method :show?, :is_admin_same_org? | ||
alias_method :update?, :is_admin_same_org? | ||
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