You can reset your own API token

This commit is contained in:
redfast00 2019-04-05 16:38:42 +02:00
parent 8f8bb86d3d
commit b367d749ca
No known key found for this signature in database
GPG key ID: 5946E0E34FD0553C

View file

@ -7,7 +7,7 @@ class UserAbility
can :manage, :all if user.penning? can :manage, :all if user.penning?
can :create, Request, creditor_id: user.id can :create, Request, creditor_id: user.id
can [:confirm, :decline], Request, debtor_id: user.id can [:confirm, :decline], Request, debtor_id: user.id
can :read, User, id: user.id can [:read, :reset_key], User, id: user.id
can :manage, Notification, user_id: user.id can :manage, Notification, user_id: user.id
can :create, Transaction do |t| can :create, Transaction do |t|
t.debtor == user && t.amount <= Rails.application.config.maximum_amount t.debtor == user && t.amount <= Rails.application.config.maximum_amount