Class: Decidim::DecidimAwesome::Admin::ForceAuthorizationsController
- Inherits:
-
ConfigController
- Object
- Admin::ApplicationController
- ApplicationController
- ConfigController
- Decidim::DecidimAwesome::Admin::ForceAuthorizationsController
- Defined in:
- app/controllers/decidim/decidim_awesome/admin/force_authorizations_controller.rb
Constant Summary
Constants included from ConfigConstraintsHelpers
ConfigConstraintsHelpers::APPLICATION_CONTEXTS, ConfigConstraintsHelpers::OTHER_MANIFESTS
Instance Method Summary collapse
Methods inherited from ConfigController
#rename_scope_label, #show, #update, #users
Methods included from ConfigConstraintsHelpers
#check, #component_manifests, #components_list, #contexts_list, #enabled_configs, #md5, #participatory_space_manifests, #participatory_spaces_list, #translate_constraint_value
Methods included from NeedsAwesomeConfig
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/decidim/decidim_awesome/admin/force_authorizations_controller.rb', line 7 def create CreateAuthorizationGroup.call(current_organization, config_var) do on(:ok) do |key| flash[:notice] = I18n.t("config.create_force_authorization.success", key:, scope: "decidim.decidim_awesome.admin") end on(:invalid) do || flash[:alert] = I18n.t("config.create_force_authorization.error", error: , scope: "decidim.decidim_awesome.admin") end end redirect_to decidim_admin_decidim_awesome.config_path(:verifications) end |
#destroy ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/controllers/decidim/decidim_awesome/admin/force_authorizations_controller.rb', line 21 def destroy DestroyAuthorizationGroup.call(params[:key], current_organization, config_var) do on(:ok) do |key| flash[:notice] = I18n.t("config.destroy_force_authorization.success", key:, scope: "decidim.decidim_awesome.admin") end on(:invalid) do || flash[:alert] = I18n.t("config.destroy_force_authorization.error", error: , scope: "decidim.decidim_awesome.admin") end end redirect_to decidim_admin_decidim_awesome.config_path(:verifications) end |