更改:action编辑权限放开

This commit is contained in:
yystopf 2025-09-10 15:45:40 +08:00
parent 0954a4c59f
commit 8af273868d
4 changed files with 12 additions and 6 deletions

View File

@ -1,5 +1,5 @@
class Action::NodeInputsController < ApplicationController class Action::NodeInputsController < ApplicationController
before_action :require_admin, except: [:index] # before_action :require_admin, except: [:index]
before_action :find_action_node before_action :find_action_node
def index def index
@ -50,7 +50,10 @@ class Action::NodeInputsController < ApplicationController
else else
flash[:danger] = '删除失败' flash[:danger] = '删除失败'
end end
redirect_to "api/actions/nodes" respond_to do |format|
format.html { redirect_to action_nodes_path }
format.json { render_ok() }
end
end end
private private

View File

@ -1,6 +1,6 @@
class Action::NodeSelectsController < ApplicationController class Action::NodeSelectsController < ApplicationController
before_action :require_admin, except: [:index] # before_action :require_admin, except: [:index]
before_action :find_action_node before_action :find_action_node
def index def index
@ -51,7 +51,10 @@ class Action::NodeSelectsController < ApplicationController
else else
flash[:danger] = '删除失败' flash[:danger] = '删除失败'
end end
redirect_to "api/actions/nodes" respond_to do |format|
format.html { redirect_to action_nodes_path }
format.json { render_ok() }
end
end end
private private

View File

@ -1,5 +1,5 @@
class Action::NodeTypesController < ApplicationController class Action::NodeTypesController < ApplicationController
before_action :require_admin, except: [:index] # before_action :require_admin, except: [:index]
before_action :find_node_type, except: [:index, :create, :new] before_action :find_node_type, except: [:index, :create, :new]
def index def index

View File

@ -1,5 +1,5 @@
class Action::TemplatesController < ApplicationController class Action::TemplatesController < ApplicationController
before_action :require_admin, except: [:index] # before_action :require_admin, except: [:index]
before_action :find_action_template, except: [:index, :create, :new] before_action :find_action_template, except: [:index, :create, :new]
def index def index