forked from jasder/taskover
demo user not available edit profile
This commit is contained in:
parent
aa56498601
commit
616fbfdeba
|
|
@ -4,6 +4,11 @@ class RegistrationsController < Devise::RegistrationsController
|
|||
|
||||
before_action :config_permitted_parameters
|
||||
|
||||
def edit
|
||||
return redirect_to root_path, alert: '当前用户不允许修改账户信息!' if current_user.ident == 'demo'
|
||||
super
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def config_permitted_parameters
|
||||
|
|
|
|||
Loading…
Reference in New Issue