Class: Decidim::DecidimAwesome::Admin::Permissions
- Inherits:
-
Decidim::DefaultPermissions
- Object
- Decidim::DefaultPermissions
- Decidim::DecidimAwesome::Admin::Permissions
- Includes:
- ConfigConstraintsHelpers
- Defined in:
- app/permissions/decidim/decidim_awesome/admin/permissions.rb
Constant Summary
Constants included from ConfigConstraintsHelpers
ConfigConstraintsHelpers::APPLICATION_CONTEXTS, ConfigConstraintsHelpers::OTHER_MANIFESTS
Instance Method Summary collapse
Methods included from ConfigConstraintsHelpers
#check, #component_manifests, #components_list, #contexts_list, #enabled_configs, #md5, #participatory_space_manifests, #participatory_spaces_list, #translate_constraint_value
Instance Method Details
#permissions ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/permissions/decidim/decidim_awesome/admin/permissions.rb', line 9 def return if .scope != :admin return unless user return if user.read_attribute("admin").blank? return unless .action == :edit_config if config_enabled?(*.subject) case .subject when :admins_available_authorizations when :admin_accountability else allow! end end end |