Skip to content

Commit 98ce112

Browse files
Remove enabled?
1 parent f18c6cf commit 98ce112

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

app/policies/organizer_position/spending/control_policy.rb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ class OrganizerPosition
44
module Spending
55
class ControlPolicy < ApplicationPolicy
66
def index?
7-
return unless enabled?
8-
97
user.auditor? || (
108
current_user_manager? || own_control?
119
)
1210
end
1311

1412
def create?
15-
return unless enabled?
16-
1713
user.admin? || (
1814
current_user_manager? &&
1915
!record.organizer_position.manager?
@@ -24,11 +20,7 @@ def create?
2420
end
2521

2622
def destroy?
27-
return unless enabled?
28-
29-
user.admin? ||
30-
current_user_manager?
31-
23+
user.admin? || current_user_manager?
3224
end
3325

3426
private
@@ -41,10 +33,6 @@ def own_control?
4133
user == record.organizer_position.user
4234
end
4335

44-
def enabled?
45-
true
46-
end
47-
4836
end
4937
end
5038

0 commit comments

Comments
 (0)