File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
app/policies/organizer_position/spending Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments