1 # frozen_string_literal: true
3 class AclsController < ApplicationController
4 include PaginationMethods
8 before_action :authorize_web
9 before_action :set_locale
13 before_action :check_database_readable
14 before_action :check_database_writable, :except => [:index]
15 before_action :set_acl, :only => [:edit, :update, :destroy]
18 @params = params.permit(:before, :after)
19 @acls = get_page_items(Acl.all)
29 @acl = Acl.new(acl_params)
32 redirect_to acls_path, :notice => t(".success")
34 render :new, :status => :unprocessable_content
39 if @acl.update(acl_params)
40 redirect_to acls_path, :notice => t(".success"), :status => :see_other
42 render :edit, :status => :unprocessable_content
48 redirect_to acls_path, :notice => t(".success"), :status => :see_other
54 @acl = Acl.find(params.expect(:id))
58 params.expect(:acl => [:address, :domain, :mx, :k, :v])