Skip to content

Commit

Permalink
[webui] Redirect after manipulating users. Fixes #493
Browse files Browse the repository at this point in the history
  • Loading branch information
hennevogel committed Jan 14, 2014
1 parent 0ae93a9 commit 56d33a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api/app/controllers/webui/user_controller.rb
Expand Up @@ -140,23 +140,27 @@ def delete
u = User.find_by_login(params[:user])
u.state = User.states['deleted']
u.save
redirect_back_or_to :action => 'show', user: u
end

def confirm
u = User.find_by_login(params[:user])
u.state = User.states['confirmed']
u.save
redirect_back_or_to :action => 'show', user: u
end

def lock
u = User.find_by_login(params[:user])
u.state = User.states['locked']
redirect_back_or_to :action => 'show', user: u
u.save
end

def admin
u = User.find_by_login(params[:user])
u.update_globalroles(%w(Admin))
redirect_back_or_to :action => 'show', user: u
u.save
end

Expand Down

0 comments on commit 56d33a4

Please sign in to comment.