Sha256: a5d42b8a0f4eaaf7019d75685908098a66f15d1b9f2634d862cce897579fa8e2

Contents?: true

Size: 468 Bytes

Versions: 3

Compression:

Stored size: 468 Bytes

Contents

authorization do
  role :guest do
    has_permission_on :users, :to => [:modify, :destroy] do
      if_attribute :id => is { user.id }
    end
  end

  role :admin do
    includes :guest
    has_permission_on :users, :to => [:modify, :destroy]
  end
end

privileges do
  privilege :add, :includes => [:new, :create]
  privilege :modify, :includes => [:edit, :update]
  privilege :read, :includes => [:index, :show]
  privilege :write, :includes => [:add, :modify]
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
double_auth_engine-0.0.4 lib/double_auth_engine/generators/double_auth_engine/templates/authorization_rules.rb
double_auth_engine-0.0.2 lib/double_auth_engine/generators/double_auth_engine/templates/authorization_rules.rb
double_auth_engine-0.0.1 lib/double_auth_engine/generators/double_auth_engine/templates/authorization_rules.rb