File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -105,15 +105,15 @@ def redirect_path
105105 end
106106
107107 def authenticate_admin!
108- redirect_to root_path , notice : "You can't be here" unless logged_in? && current_user . has_role? ( :admin )
108+ redirect_to root_path , notice : "You can't be here" unless logged_in? && current_user . is_admin?
109109 end
110110
111111 def authenticate_admin_or_organiser!
112112 redirect_to root_path , notice : "You can't be here" unless manager?
113113 end
114114
115115 def manager?
116- logged_in? && ( current_user . is_admin? || current_user . has_role? ( :organiser , :any ) )
116+ logged_in? && current_user . manager?
117117 end
118118
119119 helper_method :manager?
Original file line number Diff line number Diff line change @@ -61,6 +61,10 @@ class Member < ApplicationRecord
6161
6262 attr_accessor :attendance , :newsletter
6363
64+ def manager?
65+ is_admin? || has_role? ( :organiser , :any )
66+ end
67+
6468 def banned?
6569 bans . active . present? || bans . permanent . present?
6670 end
You can’t perform that action at this time.
0 commit comments