Sha256: f1e6bfc64fe63eba0133b21f5737d76fe2d6898d2e376e97001bc00f91457447

Contents?: true

Size: 643 Bytes

Versions: 32

Compression:

Stored size: 643 Bytes

Contents

# Define permissions for your plugin in here.
# See https://github.com/stffn/declarative_authorization for further informations.
authorization do
  
  role :guest do
    has_permission_on :<%= @plugin_name.tableize %>, :to => [:show]
  end
  
  role :registered do
    includes :guest
  end
  
  role :author do
    includes :registered
  end
  
  role :editor do
    includes :author
  end
  
  role :admin do
    includes :editor
    has_permission_on :admin_<%= @plugin_name.tableize %>, :to => [:manage]
  end
  
end

privileges do
  
  privilege :manage do
    includes :index, :new, :create, :show, :edit, :update, :destroy
  end
  
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
alchemy_cms-2.1.12 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.0.7 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.11 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.9.1 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.9 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.8.1 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.8 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.7 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.6 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.5 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.4 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.3 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.2 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.1 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.rc6 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.rc5 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.rc4 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.rc3 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb
alchemy_cms-2.1.rc2 lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb