Start refactoring rights to cancan

This commit is contained in:
Martin Lensment 2015-03-10 10:57:10 +02:00
parent fe7ca94863
commit d1ec91323b
5 changed files with 50 additions and 539 deletions

View file

@ -25,6 +25,9 @@ class Ability
can(:delete, Epp::Contact) { |c, pw| c.registrar_id == @user.registrar_id && c.auth_info == pw }
can(:renew, Epp::Contact)
can(:view_password, Epp::Contact) { |c| c.registrar_id == @user.registrar_id }
# Epp::Domain
can(:info, Epp::EppDomain) { |d, pw| d.registrar_id == @user.registrar_id || d.auth_info == pw }
end
def user