only generate new token if admin

This commit is contained in:
danielgrippi 2011-05-18 19:36:52 -07:00
parent 41e1d0dd86
commit dd31f37fd0
2 changed files with 2 additions and 1 deletions

View file

@ -142,6 +142,7 @@ class UsersController < ApplicationController
send_data( File.open(tar_path).read, :filename => "#{current_user.id}.tar" )
end
before_filter :redirect_unless_admin, :only => :generate_new_token
def generate_new_token
if current_user.reset_authentication_token!
@token = current_user.authentication_token

View file

@ -19,7 +19,7 @@ describe Bookmark do
}
},
"object"=> {
"url"=>"cubbi.es/daniel",
"url"=>"http://cubbi.es/daniel",
"objectType"=>"bookmark"
}
}