Parent

Files

Padrino::Admin::AccessControl::Authorization

Project Authorization Class

Attributes

allowed[R]
denied[R]
project_modules[R]
roles[R]

Public Class Methods

new(*roles, &block) click to toggle source
# File lib/padrino-admin/access_control.rb, line 123
def initialize(*roles, &block) # @private
  @roles           = roles
  @allowed         = []
  @denied          = []
  @project_modules = []
  yield self
end

Public Instance Methods

allow(path) click to toggle source

Allow a specified path

# File lib/padrino-admin/access_control.rb, line 134
def allow(path)
  @allowed << path unless @allowed.include?(path)
end
project_module(name, path) click to toggle source

Create a project module

# File lib/padrino-admin/access_control.rb, line 148
def project_module(name, path)
  allow(path)
  @project_modules << ProjectModule.new(name, path)
end
protect(path) click to toggle source

Protect access from

# File lib/padrino-admin/access_control.rb, line 141
def protect(path)
  @denied << path unless @denied.include?(path)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.