24 lines
445 B
Ruby
24 lines
445 B
Ruby
module Admin::EmailersHelper
|
|
|
|
def load_access_level
|
|
if (current_user.is_admin? rescue false)
|
|
@access_level = "admin"
|
|
elsif (current_user.is_manager?(@module_app) rescue false)
|
|
@access_level = "manager"
|
|
else
|
|
@access_level = "users"
|
|
end
|
|
end
|
|
|
|
def user_can_approve?
|
|
case @access_level
|
|
when "admin"
|
|
return true
|
|
when "manager"
|
|
return true
|
|
else
|
|
return false
|
|
end
|
|
end
|
|
|
|
end |