Module: UcbRailsUser::UserRolesConcerns

Extended by:
ActiveSupport::Concern
Defined in:
app/models/concerns/ucb_rails_user/user_roles_concerns.rb

Instance Method Summary collapse

Instance Method Details

#has_role?(role) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/models/concerns/ucb_rails_user/user_roles_concerns.rb', line 9

def has_role?(role)
  superuser? || roles.include?(role)
end

#rolesObject

Overridden by application



5
6
7
# File 'app/models/concerns/ucb_rails_user/user_roles_concerns.rb', line 5

def roles
  []
end