# derzeit genutzte Rollen: # * ADMIN # * EDITOR # * APPROVER # * USER # # Pfad-Zugriffsregeln # Aufbau: # path().grant[.method()][.not][.role()][.extension([, )] # or # path().deny[.method()][.not][.role()][.extension([, )] # with # : HTTP-Method name as Symbol (:get, :put, :post, :delete) or :all path('/').grant.method(:get) path(:all).grant.role(:ADMIN) path('/user/lock').deny.role(:USER).role(:APPROVER) path('/special').grant.extension(:special?, :area1) # # Model-Object-Zugriffsregeln # Aufbau: # model().grant.permission()[.role()][.extension([, ])] # or # model().deny.permission()[.not][.role()][.extension([, ])] # or # model( do # grant..permission()[.role()][.extension([, ])] # deny.permission()[.role()][.extension([, ])] # ... # end model(Dashboard).grant.permission(:view) model(Todo) do grant.permission(:view) grant.permission(:full_view).role(:ADMIN) grant.permission(:update).role(:EDITOR).extension(:owned_by?) # calls Todo.owned_by?(current_user) grant-permission(:delete).not.role(:ADMIN) end