users with no negative feedback can now change their names

This commit is contained in:
albert
2011-12-20 16:18:35 -05:00
parent 30fb0b660c
commit 5e3b243b67
6 changed files with 48 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
class UsersController < ApplicationController
respond_to :html, :xml, :json
before_filter :member_only, :only => [:edit, :update]
before_filter :member_only, :only => [:edit, :update, :upgrade]
rescue_from User::PrivilegeError, :with => "static/access_denied"
def new
@@ -53,6 +53,12 @@ class UsersController < ApplicationController
redirect_to user_path(@user), :notice => "Email was sent"
end
def cache
@user = User.find(params[:id])
@user.update_cache
render :nothing => true
end
private
def check_privilege(user)