mirror of
https://github.com/internetee/registry.git
synced 2025-05-21 03:39:40 +02:00
Start refactoring rights to cancan
This commit is contained in:
parent
fe7ca94863
commit
d1ec91323b
5 changed files with 50 additions and 539 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue