Skip to content

Commit

Permalink
Changed orde roles within policies
Browse files Browse the repository at this point in the history
  • Loading branch information
lodewiges committed Dec 13, 2024
1 parent c9180ea commit 605f789
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/policies/activity_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def create?
end

def update?
user&.treasurer? || user&.main_bartender? || user&.renting_manager?
user&.treasurer? || user&.renting_manager? || user&.main_bartender?

Check failure on line 17 in app/policies/activity_policy.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Layout/SpaceAroundOperators: Operator || should be surrounded by a single space. (https://rubystyle.guide#spaces-operators)
end

def lock?
Expand Down
4 changes: 2 additions & 2 deletions app/policies/application_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(user, record)
end

def index?
user&.treasurer? || user&.main_bartender? || user&.renting_manager?
user&.treasurer? || user&.renting_manager? || user&.main_bartender?

Check failure on line 10 in app/policies/application_policy.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Layout/SpaceAroundOperators: Operator || should be surrounded by a single space. (https://rubystyle.guide#spaces-operators)
end

def show?
Expand All @@ -31,7 +31,7 @@ def edit?
end

def destroy?
user&.treasurer? || user&.main_bartender? || user&.renting_manager?
user&.treasurer? || user&.renting_manager? || user&.main_bartender?
end

def scope
Expand Down
2 changes: 1 addition & 1 deletion app/policies/price_list_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def index?
end

def show?
user&.treasurer? || user&.main_bartender? || user&.renting_manager?
user&.treasurer? || user&.renting_manager? || user&.main_bartender?

Check failure on line 17 in app/policies/price_list_policy.rb

View workflow job for this annotation

GitHub Actions / Lint

[Correctable] Layout/SpaceAroundOperators: Operator || should be surrounded by a single space. (https://rubystyle.guide#spaces-operators)
end

def create?
Expand Down

0 comments on commit 605f789

Please sign in to comment.