only generate new token if admin
This commit is contained in:
parent
41e1d0dd86
commit
dd31f37fd0
2 changed files with 2 additions and 1 deletions
|
|
@ -142,6 +142,7 @@ class UsersController < ApplicationController
|
||||||
send_data( File.open(tar_path).read, :filename => "#{current_user.id}.tar" )
|
send_data( File.open(tar_path).read, :filename => "#{current_user.id}.tar" )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
before_filter :redirect_unless_admin, :only => :generate_new_token
|
||||||
def generate_new_token
|
def generate_new_token
|
||||||
if current_user.reset_authentication_token!
|
if current_user.reset_authentication_token!
|
||||||
@token = current_user.authentication_token
|
@token = current_user.authentication_token
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ describe Bookmark do
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"object"=> {
|
"object"=> {
|
||||||
"url"=>"cubbi.es/daniel",
|
"url"=>"http://cubbi.es/daniel",
|
||||||
"objectType"=>"bookmark"
|
"objectType"=>"bookmark"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue