Module: ActiveAcl
- Defined in:
- app/models/active_acl/acl.rb,
lib/active_acl.rb,
lib/active_acl/base.rb,
lib/active_acl/grant.rb,
lib/active_acl/options.rb,
app/models/active_acl/privilege.rb,
app/models/active_acl/acl_section.rb,
app/models/active_acl/target_link.rb,
lib/active_acl/handler/nested_set.rb,
lib/active_acl/acts_as_access_group.rb,
app/models/active_acl/requester_link.rb,
lib/active_acl/acts_as_access_object.rb,
lib/active_acl/handler/object_handler.rb,
app/models/active_acl/target_group_link.rb,
app/models/active_acl/requester_group_link.rb
Overview
Defined Under Namespace
Modules: Acts, Cache, DB
Classes: Acl, AclSection, ControllerAction, ControllerGroup, Privilege, RequesterGroupLink, RequesterLink, TargetGroupLink, TargetLink
Constant Summary
collapse
- CONTROLLERS =
{}
- GROUP_CLASSES =
{}
- ACCESS_CLASSES =
{}
- OPTIONS =
{}
- DEFAULT_OPTIONS =
{
:acl_sections_table => 'acl_sections',
:acls_privileges_table => 'acls_privileges',
:acls_table => 'acls',
:privileges_table => 'privileges',
:requester_links_table => 'requester_links',
:target_links_table => 'target_links',
:requester_group_links_table => 'requester_group_links',
:target_group_links_table => 'target_group_links',
:controller_actions_table => 'controller_actions',
:controller_groups_table => 'controller_groups',
:controllers_group_name => 'unassigned_controller_actions',
:controller_group_name_suffix => '_controller',
:cache_privilege_timeout => 10,
:db => ActiveAcl::DB::ActiveRecordAdapter,
:cache => ActiveAcl::Cache::NoCacheAdapter,
:default_selector_controller => 'selector',
:default_selector_action => 'show_members',
:default_group_selector_controller => 'selector',
:default_group_selector_action => 'show_group_members'}
Class Method Summary
collapse
Class Method Details
.from_classes ⇒ Object
12
13
14
15
16
|
# File 'lib/active_acl/base.rb', line 12
def self.from_classes
ActiveAcl::ACCESS_CLASSES.keys.collect do |x|
x.split('::').join('/').underscore.pluralize.to_sym
end
end
|
.is_access_group?(klass) ⇒ Boolean
6
7
8
|
# File 'lib/active_acl/base.rb', line 6
def self.is_access_group?(klass)
!!ActiveAcl::GROUP_CLASSES[klass.name]
end
|
.is_access_object?(klass) ⇒ Boolean
9
10
11
|
# File 'lib/active_acl/base.rb', line 9
def self.is_access_object?(klass)
!!ActiveAcl::ACCESS_CLASSES[klass.name]
end
|