Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- authorization do
- # только свои афилы
- role :affiliate do
- has_permission_on :affiliates, :to => :all do
- if_attribute :contractor_id => is { user.id }
- end
- end
- # можно редактировать и смотреть только зизу-лт сделки :)
- role :zizu_lt_deals_editor do
- has_permission_on :deals, :to => :all do
- if_attribute :site_id => is { 7 }
- end
- end
- end
Add Comment
Please, Sign In to add comment