Class: Para::Acl::RoleComponent

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/para/acl/role_component.rb

Instance Method Summary collapse

Instance Method Details

#allow?Boolean

If the allow field is not filled this means that we should fallback on the parent role’s #authorize_new_components field

Returns:

  • (Boolean)


12
13
14
# File 'app/models/para/acl/role_component.rb', line 12

def allow?
  allow == nil ? role.authorize_new_components : allow
end