patrick-lockdown 2.0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +42 -0
- data/Rakefile +54 -0
- data/lib/lockdown.rb +42 -0
- data/lib/lockdown/access.rb +108 -0
- data/lib/lockdown/configuration.rb +209 -0
- data/lib/lockdown/database.rb +122 -0
- data/lib/lockdown/delivery.rb +28 -0
- data/lib/lockdown/errors.rb +7 -0
- data/lib/lockdown/frameworks/rails.rb +77 -0
- data/lib/lockdown/frameworks/rails/controller.rb +145 -0
- data/lib/lockdown/frameworks/rails/view.rb +51 -0
- data/lib/lockdown/helper.rb +40 -0
- data/lib/lockdown/orms/active_record.rb +66 -0
- data/lib/lockdown/permission.rb +56 -0
- data/lib/lockdown/resource.rb +54 -0
- data/lib/lockdown/session.rb +50 -0
- data/lib/lockdown/user_group.rb +16 -0
- data/patrick-lockdown.gemspec +62 -0
- data/tags +142 -0
- data/test/helper.rb +10 -0
- data/test/lockdown/test_access.rb +80 -0
- data/test/lockdown/test_configuration.rb +195 -0
- data/test/lockdown/test_delivery.rb +224 -0
- data/test/lockdown/test_helper.rb +33 -0
- data/test/lockdown/test_permission.rb +73 -0
- data/test/lockdown/test_resource.rb +47 -0
- data/test/lockdown/test_session.rb +31 -0
- data/test/lockdown/test_user_group.rb +17 -0
- metadata +96 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Lockdown
|
4
|
+
module Orms
|
5
|
+
module ActiveRecord
|
6
|
+
class << self
|
7
|
+
def included(mod)
|
8
|
+
mod.extend Lockdown::Orms::ActiveRecord::Helper
|
9
|
+
mixin
|
10
|
+
end
|
11
|
+
|
12
|
+
def mixin
|
13
|
+
Lockdown.orm_parent.class_eval do
|
14
|
+
include Lockdown::Orms::ActiveRecord::Stamps
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end # class block
|
18
|
+
|
19
|
+
module Helper
|
20
|
+
def orm_parent
|
21
|
+
::ActiveRecord::Base
|
22
|
+
end
|
23
|
+
|
24
|
+
def database_execute(query)
|
25
|
+
orm_parent.connection.execute(query)
|
26
|
+
end
|
27
|
+
|
28
|
+
def database_query(query)
|
29
|
+
orm_parent.connection.execute(query)
|
30
|
+
end
|
31
|
+
|
32
|
+
def database_table_exists?(klass)
|
33
|
+
klass.table_exists?
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
module Stamps
|
38
|
+
def self.included(base)
|
39
|
+
base.class_eval do
|
40
|
+
alias_method :create_without_stamps, :create
|
41
|
+
alias_method :create, :create_with_stamps
|
42
|
+
alias_method :update_without_stamps, :update
|
43
|
+
alias_method :update, :update_with_stamps
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def current_who_did_it
|
48
|
+
Thread.current[:who_did_it]
|
49
|
+
end
|
50
|
+
|
51
|
+
def create_with_stamps
|
52
|
+
pid = current_who_did_it || Lockdown::Configuration.default_who_did_it
|
53
|
+
self[:created_by] = pid if respond_to?(:created_by)
|
54
|
+
self[:updated_by] = pid if respond_to?(:updated_by)
|
55
|
+
create_without_stamps
|
56
|
+
end
|
57
|
+
|
58
|
+
def update_with_stamps
|
59
|
+
pid = current_who_did_it || Lockdown::Configuration.default_who_did_it
|
60
|
+
self[:updated_by] = pid if respond_to?(:updated_by)
|
61
|
+
update_without_stamps
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Lockdown
|
4
|
+
class Permission
|
5
|
+
# Name of permission
|
6
|
+
attr_accessor :name
|
7
|
+
# Array of resource objects that define the access rights for this permission
|
8
|
+
attr_reader :resources
|
9
|
+
|
10
|
+
# @param [String,Symbol] name permission reference.
|
11
|
+
def initialize(name)
|
12
|
+
@name = name.to_s
|
13
|
+
@resources = []
|
14
|
+
@ispublic = false
|
15
|
+
@isprotected = false
|
16
|
+
end
|
17
|
+
|
18
|
+
# @param [String,Symbol] name resource reference.
|
19
|
+
# @return new resource
|
20
|
+
def resource(name, &block)
|
21
|
+
resource = Lockdown::Resource.new(name)
|
22
|
+
resource.instance_eval(&block) if block_given?
|
23
|
+
@resources << resource
|
24
|
+
resource
|
25
|
+
end
|
26
|
+
|
27
|
+
alias_method :controller, :resource
|
28
|
+
|
29
|
+
def controllers
|
30
|
+
@resources
|
31
|
+
end
|
32
|
+
|
33
|
+
def is_public
|
34
|
+
@ispublic = true
|
35
|
+
@isprotected = false
|
36
|
+
end
|
37
|
+
|
38
|
+
def public?
|
39
|
+
@ispublic
|
40
|
+
end
|
41
|
+
|
42
|
+
def is_protected
|
43
|
+
@isprotected = true
|
44
|
+
@ispublic = false
|
45
|
+
end
|
46
|
+
|
47
|
+
def protected?
|
48
|
+
@isprotected
|
49
|
+
end
|
50
|
+
|
51
|
+
# @return String representing all resources defining this permission
|
52
|
+
def regex_pattern
|
53
|
+
resources.collect{|r| "(#{r.regex_pattern})"}.join("|")
|
54
|
+
end
|
55
|
+
end # Permission
|
56
|
+
end # Lockdown
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Lockdown
|
4
|
+
class Resource
|
5
|
+
class << self
|
6
|
+
attr_accessor :resources, :resources_regex
|
7
|
+
|
8
|
+
# When a new resource is created, this method is called to register the root
|
9
|
+
def register_regex(resource)
|
10
|
+
resource = "(#{resource})"
|
11
|
+
@resources << resource unless @resources.include?(resource)
|
12
|
+
end
|
13
|
+
|
14
|
+
# @return [Regexp] created from resources' base regex
|
15
|
+
def regex
|
16
|
+
@resources_regex ||= Lockdown.regex(@resources.join("|"))
|
17
|
+
end
|
18
|
+
end # class block
|
19
|
+
|
20
|
+
# Initialize resources to empty array
|
21
|
+
@resources = []
|
22
|
+
|
23
|
+
# Name of the resource
|
24
|
+
attr_accessor :name
|
25
|
+
# Regular expression pattern
|
26
|
+
attr_accessor :regex_pattern
|
27
|
+
# The only methods restricted on the resource
|
28
|
+
attr_accessor :exceptions
|
29
|
+
# The only methods allowed on the resource
|
30
|
+
attr_accessor :inclusions
|
31
|
+
|
32
|
+
|
33
|
+
# @param [String,Symbol] name resource reference.
|
34
|
+
def initialize(name)
|
35
|
+
@name = name.to_s
|
36
|
+
@regex_pattern = "\/#{@name}(\/.*)?"
|
37
|
+
self.class.register_regex(@regex_pattern)
|
38
|
+
end
|
39
|
+
|
40
|
+
# @param *[String,Symbol] only methods restricted on the resource
|
41
|
+
def except(*methods)
|
42
|
+
return if methods.empty?
|
43
|
+
@exceptions = methods.collect{|m| m.to_s}
|
44
|
+
@regex_pattern = "\/#{@name}(?!\/(#{@exceptions.join('|')}))(\/.*)?"
|
45
|
+
end
|
46
|
+
|
47
|
+
# @param *[String,Symbol] only methods allowed on the resource
|
48
|
+
def only(*methods)
|
49
|
+
return if methods.empty?
|
50
|
+
@inclusions = methods.collect{|m| m.to_s}
|
51
|
+
@regex_pattern = "\/#{@name}\/(#{@inclusions.join('|')})(\/)?"
|
52
|
+
end
|
53
|
+
end # Resource
|
54
|
+
end # Lockdown
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Lockdown
|
4
|
+
module Session
|
5
|
+
|
6
|
+
|
7
|
+
def add_lockdown_session_values(user = nil)
|
8
|
+
user ||= current_user
|
9
|
+
|
10
|
+
if user
|
11
|
+
session[:access_rights] = Lockdown::Configuration.access_rights_for_user(user)
|
12
|
+
session[:current_user_id] = user.id
|
13
|
+
else
|
14
|
+
session[:access_rights] = Lockdown::Configuration.public_access
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# Tests for current_user_id > 0
|
19
|
+
# @return [True|False]
|
20
|
+
def logged_in?
|
21
|
+
current_user_id.to_i > 0
|
22
|
+
end
|
23
|
+
|
24
|
+
# @return session value of current_user_id
|
25
|
+
def current_user_id
|
26
|
+
session[:current_user_id]
|
27
|
+
end
|
28
|
+
|
29
|
+
# Returns true if the permission's regex_pattern is
|
30
|
+
# in session[:access_rights]
|
31
|
+
# @param [String] name permission name
|
32
|
+
# @return [True|False]
|
33
|
+
def access_in_perm?(name)
|
34
|
+
if perm = Lockdown::Configuration.permission(name)
|
35
|
+
return session_access_rights.include?(perm.regex_pattern)
|
36
|
+
end
|
37
|
+
false
|
38
|
+
end
|
39
|
+
|
40
|
+
def session_access_rights
|
41
|
+
session[:access_rights].to_s
|
42
|
+
end
|
43
|
+
|
44
|
+
def reset_lockdown_session
|
45
|
+
[:expiry_time, :current_user_id, :access_rights].each do |val|
|
46
|
+
session[val] = nil if session[val]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end # Session
|
50
|
+
end # Lockdown
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Lockdown
|
4
|
+
class UserGroup
|
5
|
+
# Name of permission
|
6
|
+
attr_accessor :name
|
7
|
+
# Array of permission objects that define the user group
|
8
|
+
attr_accessor :permissions
|
9
|
+
|
10
|
+
# @param [String,Symbol] name permission reference.
|
11
|
+
def initialize(name)
|
12
|
+
@name = name.to_s
|
13
|
+
@permissions = []
|
14
|
+
end
|
15
|
+
end # Permission
|
16
|
+
end # Lockdown
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{patrick-lockdown}
|
8
|
+
s.version = "2.0.4.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Andrew Stone", "Patrick Baselier"]
|
12
|
+
s.date = %q{2012-05-10}
|
13
|
+
s.description = %q{Restrict access to your controller actions. }
|
14
|
+
s.email = %q{patrick.baselier@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README.md"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
"README.md",
|
20
|
+
"Rakefile",
|
21
|
+
"lib/lockdown.rb",
|
22
|
+
"lib/lockdown/access.rb",
|
23
|
+
"lib/lockdown/configuration.rb",
|
24
|
+
"lib/lockdown/database.rb",
|
25
|
+
"lib/lockdown/delivery.rb",
|
26
|
+
"lib/lockdown/errors.rb",
|
27
|
+
"lib/lockdown/frameworks/rails.rb",
|
28
|
+
"lib/lockdown/frameworks/rails/controller.rb",
|
29
|
+
"lib/lockdown/frameworks/rails/view.rb",
|
30
|
+
"lib/lockdown/helper.rb",
|
31
|
+
"lib/lockdown/orms/active_record.rb",
|
32
|
+
"lib/lockdown/permission.rb",
|
33
|
+
"lib/lockdown/resource.rb",
|
34
|
+
"lib/lockdown/session.rb",
|
35
|
+
"lib/lockdown/user_group.rb",
|
36
|
+
"patrick-lockdown.gemspec",
|
37
|
+
"tags",
|
38
|
+
"test/helper.rb",
|
39
|
+
"test/lockdown/test_access.rb",
|
40
|
+
"test/lockdown/test_configuration.rb",
|
41
|
+
"test/lockdown/test_delivery.rb",
|
42
|
+
"test/lockdown/test_helper.rb",
|
43
|
+
"test/lockdown/test_permission.rb",
|
44
|
+
"test/lockdown/test_resource.rb",
|
45
|
+
"test/lockdown/test_session.rb",
|
46
|
+
"test/lockdown/test_user_group.rb"
|
47
|
+
]
|
48
|
+
s.homepage = %q{https://github.com/ludo/patrick-lockdown}
|
49
|
+
s.require_paths = ["lib"]
|
50
|
+
s.rubygems_version = %q{1.5.2}
|
51
|
+
s.summary = %q{Authorization system for Rails}
|
52
|
+
|
53
|
+
if s.respond_to? :specification_version then
|
54
|
+
s.specification_version = 3
|
55
|
+
|
56
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
57
|
+
else
|
58
|
+
end
|
59
|
+
else
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
data/tags
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
|
2
|
+
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
3
|
+
!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
|
4
|
+
!_TAG_PROGRAM_NAME Exuberant Ctags //
|
5
|
+
!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
|
6
|
+
!_TAG_PROGRAM_VERSION 5.8 //
|
7
|
+
Access lib/lockdown/access.rb /^ module Access$/;" m class:Lockdown
|
8
|
+
ActiveRecord lib/lockdown/orms/active_record.rb /^ module ActiveRecord$/;" m class:Lockdown.Orms
|
9
|
+
Configuration lib/lockdown/configuration.rb /^ module Configuration$/;" m class:Lockdown
|
10
|
+
Controller lib/lockdown/frameworks/rails/controller.rb /^ module Controller$/;" m class:Lockdown.Frameworks.Rails
|
11
|
+
Database lib/lockdown/database.rb /^ class Database$/;" c class:Lockdown
|
12
|
+
Delivery lib/lockdown/delivery.rb /^ class Delivery$/;" c class:Lockdown
|
13
|
+
Environment lib/lockdown/frameworks/rails.rb /^ module Environment$/;" m class:Lockdown.Frameworks
|
14
|
+
Frameworks lib/lockdown/frameworks/rails.rb /^ module Frameworks$/;" m class:Lockdown
|
15
|
+
Frameworks lib/lockdown/frameworks/rails/controller.rb /^ module Frameworks$/;" m class:Lockdown
|
16
|
+
Frameworks lib/lockdown/frameworks/rails/view.rb /^ module Frameworks$/;" m class:Lockdown
|
17
|
+
Helper lib/lockdown/helper.rb /^ module Helper$/;" m class:Lockdown
|
18
|
+
Helper lib/lockdown/orms/active_record.rb /^ module Helper$/;" m class:Lockdown.Orms
|
19
|
+
InvalidPermissionAssignment lib/lockdown/errors.rb /^ class InvalidPermissionAssignment < StandardError; end$/;" c class:Lockdown
|
20
|
+
Lock lib/lockdown/frameworks/rails/controller.rb /^ module Lock$/;" m class:Lockdown.Frameworks.Rails.Controller
|
21
|
+
Lockdown lib/lockdown.rb /^module Lockdown$/;" m
|
22
|
+
Lockdown lib/lockdown/access.rb /^module Lockdown$/;" m
|
23
|
+
Lockdown lib/lockdown/configuration.rb /^module Lockdown$/;" m
|
24
|
+
Lockdown lib/lockdown/database.rb /^module Lockdown$/;" m
|
25
|
+
Lockdown lib/lockdown/delivery.rb /^module Lockdown$/;" m
|
26
|
+
Lockdown lib/lockdown/errors.rb /^module Lockdown$/;" m
|
27
|
+
Lockdown lib/lockdown/frameworks/rails.rb /^module Lockdown$/;" m
|
28
|
+
Lockdown lib/lockdown/frameworks/rails/controller.rb /^module Lockdown$/;" m
|
29
|
+
Lockdown lib/lockdown/frameworks/rails/view.rb /^module Lockdown$/;" m
|
30
|
+
Lockdown lib/lockdown/helper.rb /^module Lockdown$/;" m
|
31
|
+
Lockdown lib/lockdown/orms/active_record.rb /^module Lockdown$/;" m
|
32
|
+
Lockdown lib/lockdown/permission.rb /^module Lockdown$/;" m
|
33
|
+
Lockdown lib/lockdown/resource.rb /^module Lockdown$/;" m
|
34
|
+
Lockdown lib/lockdown/session.rb /^module Lockdown$/;" m
|
35
|
+
Lockdown lib/lockdown/user_group.rb /^module Lockdown$/;" m
|
36
|
+
Orms lib/lockdown/orms/active_record.rb /^ module Orms$/;" m class:Lockdown
|
37
|
+
Permission lib/lockdown/permission.rb /^ class Permission$/;" c class:Lockdown
|
38
|
+
PermissionNotFound lib/lockdown/errors.rb /^ class PermissionNotFound < StandardError; end$/;" c class:Lockdown
|
39
|
+
Rails lib/lockdown/frameworks/rails.rb /^ module Rails$/;" m class:Lockdown.Frameworks
|
40
|
+
Rails lib/lockdown/frameworks/rails/controller.rb /^ module Rails$/;" m class:Lockdown.Frameworks
|
41
|
+
Rails lib/lockdown/frameworks/rails/view.rb /^ module Rails$/;" m class:Lockdown.Frameworks
|
42
|
+
Resource lib/lockdown/resource.rb /^ class Resource$/;" c class:Lockdown
|
43
|
+
Session lib/lockdown/session.rb /^ module Session$/;" m class:Lockdown
|
44
|
+
Stamps lib/lockdown/orms/active_record.rb /^ module Stamps$/;" m class:Lockdown.Orms
|
45
|
+
UserGroup lib/lockdown/user_group.rb /^ class UserGroup$/;" c class:Lockdown
|
46
|
+
View lib/lockdown/frameworks/rails/view.rb /^ module View$/;" m class:Lockdown.Frameworks.Rails
|
47
|
+
access_in_perm? lib/lockdown/session.rb /^ def access_in_perm?(name)$/;" f class:Lockdown.Session
|
48
|
+
access_rights_for_permissions lib/lockdown/configuration.rb /^ def access_rights_for_permissions(*names)$/;" f class:Lockdown.Configuration
|
49
|
+
access_rights_for_user lib/lockdown/configuration.rb /^ def access_rights_for_user(user)$/;" f class:Lockdown.Configuration
|
50
|
+
add_lockdown_session_values lib/lockdown/session.rb /^ def add_lockdown_session_values(user = nil)$/;" f class:Lockdown.Session
|
51
|
+
add_valid_permissions lib/lockdown/database.rb /^ def add_valid_permissions(ug)$/;" f class:Lockdown.Database
|
52
|
+
administrator? lib/lockdown/configuration.rb /^ def administrator?(user)$/;" f class:Lockdown.Configuration
|
53
|
+
administrator_group_name lib/lockdown/helper.rb /^ def administrator_group_name$/;" f class:Lockdown.Helper
|
54
|
+
allowed? lib/lockdown/delivery.rb /^ def allowed?(path, access_rights = nil)$/;" f class:Lockdown.Delivery
|
55
|
+
authenticated_access lib/lockdown/configuration.rb /^ def authenticated_access$/;" f class:Lockdown.Configuration
|
56
|
+
authorized? lib/lockdown/frameworks/rails/controller.rb /^ def authorized?(url, method = nil)$/;" f class:Lockdown.Frameworks.Rails.Controller.Lock
|
57
|
+
button_to_secured lib/lockdown/frameworks/rails/view.rb /^ def button_to_secured(name, options = {}, html_options = nil)$/;" f class:Lockdown.Frameworks.Rails.View
|
58
|
+
caching? lib/lockdown/frameworks/rails.rb /^ def caching?$/;" f class:Lockdown.Frameworks.Environment
|
59
|
+
check_request_authorization lib/lockdown/frameworks/rails/controller.rb /^ def check_request_authorization$/;" f class:Lockdown.Frameworks.Rails.Controller.Lock
|
60
|
+
configure lib/lockdown/access.rb /^ def configure$/;" f class:Lockdown.Access
|
61
|
+
configure_lockdown lib/lockdown/frameworks/rails/controller.rb /^ def configure_lockdown$/;" f class:Lockdown.Frameworks.Rails.Controller.Lock
|
62
|
+
controller_parent lib/lockdown/frameworks/rails.rb /^ def controller_parent$/;" f class:Lockdown.Frameworks.Environment
|
63
|
+
controllers lib/lockdown/permission.rb /^ def controllers$/;" f class:Lockdown.Permission
|
64
|
+
create_new_permissions lib/lockdown/database.rb /^ def create_new_permissions$/;" f class:Lockdown.Database
|
65
|
+
create_user_group lib/lockdown/database.rb /^ def create_user_group(name)$/;" f class:Lockdown.Database
|
66
|
+
create_with_stamps lib/lockdown/orms/active_record.rb /^ def create_with_stamps$/;" f class:Lockdown.Orms.Stamps
|
67
|
+
current_user_id lib/lockdown/session.rb /^ def current_user_id$/;" f class:Lockdown.Session
|
68
|
+
current_who_did_it lib/lockdown/orms/active_record.rb /^ def current_who_did_it$/;" f class:Lockdown.Orms.Stamps
|
69
|
+
database_execute lib/lockdown/orms/active_record.rb /^ def database_execute(query)$/;" f class:Lockdown.Orms.Helper
|
70
|
+
database_query lib/lockdown/orms/active_record.rb /^ def database_query(query)$/;" f class:Lockdown.Orms.Helper
|
71
|
+
database_table_exists? lib/lockdown/orms/active_record.rb /^ def database_table_exists?(klass)$/;" f class:Lockdown.Orms.Helper
|
72
|
+
delete_extinct_permissions lib/lockdown/database.rb /^ def delete_extinct_permissions$/;" f class:Lockdown.Database
|
73
|
+
except lib/lockdown/resource.rb /^ def except(*methods)$/;" f class:Lockdown
|
74
|
+
find_or_create_user_group lib/lockdown/configuration.rb /^ def find_or_create_user_group(name)$/;" f class:Lockdown.Configuration
|
75
|
+
has_permission? lib/lockdown/configuration.rb /^ def has_permission?(permission)$/;" f class:Lockdown.Configuration
|
76
|
+
included lib/lockdown/frameworks/rails.rb /^ def included(mod)$/;" f class:Lockdown.Frameworks.Rails
|
77
|
+
included lib/lockdown/frameworks/rails/view.rb /^ def self.included(base)$/;" F class:Lockdown.Frameworks.Rails.View
|
78
|
+
included lib/lockdown/orms/active_record.rb /^ def included(mod)$/;" f class:Lockdown.Orms.ActiveRecord
|
79
|
+
included lib/lockdown/orms/active_record.rb /^ def self.included(base)$/;" F class:Lockdown.Orms.Stamps
|
80
|
+
initialize lib/lockdown/permission.rb /^ def initialize(name)$/;" f class:Lockdown.Permission
|
81
|
+
initialize lib/lockdown/resource.rb /^ def initialize(name)$/;" f class:Lockdown
|
82
|
+
initialize lib/lockdown/user_group.rb /^ def initialize(name)$/;" f class:Lockdown.UserGroup
|
83
|
+
is_protected lib/lockdown/permission.rb /^ def is_protected$/;" f class:Lockdown.Permission
|
84
|
+
is_public lib/lockdown/permission.rb /^ def is_public$/;" f class:Lockdown.Permission
|
85
|
+
ld_access_denied lib/lockdown/frameworks/rails/controller.rb /^ def ld_access_denied(e)$/;" f class:Lockdown.Frameworks.Rails.Controller.Lock
|
86
|
+
link_to_or_show lib/lockdown/frameworks/rails/view.rb /^ def link_to_or_show(name, options = {}, html_options = nil)$/;" f class:Lockdown.Frameworks.Rails.View
|
87
|
+
link_to_secured lib/lockdown/frameworks/rails/view.rb /^ def link_to_secured(name, options = {}, html_options = nil)$/;" f class:Lockdown.Frameworks.Rails.View
|
88
|
+
links lib/lockdown/frameworks/rails/view.rb /^ def links(*lis)$/;" f class:Lockdown.Frameworks.Rails.View
|
89
|
+
logged_in? lib/lockdown/session.rb /^ def logged_in?$/;" f class:Lockdown.Session
|
90
|
+
maintain_user_groups lib/lockdown/database.rb /^ def maintain_user_groups$/;" f class:Lockdown.Database
|
91
|
+
make_permission_protected lib/lockdown/configuration.rb /^ def make_permission_protected(name)$/;" f class:Lockdown.Configuration
|
92
|
+
make_permission_public lib/lockdown/configuration.rb /^ def make_permission_public(name)$/;" f class:Lockdown.Configuration
|
93
|
+
make_user_administrator lib/lockdown/configuration.rb /^ def make_user_administrator(user)$/;" f class:Lockdown.Configuration
|
94
|
+
maybe_add_user_group lib/lockdown/configuration.rb /^ def maybe_add_user_group(group)$/;" f class:Lockdown.Configuration
|
95
|
+
mixin lib/lockdown/frameworks/rails.rb /^ def mixin$/;" f class:Lockdown.Frameworks.Rails
|
96
|
+
mixin lib/lockdown/orms/active_record.rb /^ def mixin$/;" f class:Lockdown.Orms.ActiveRecord
|
97
|
+
mixin_controller lib/lockdown/frameworks/rails.rb /^ def mixin_controller(klass = Lockdown.controller_parent)$/;" f class:Lockdown.Frameworks.Rails
|
98
|
+
only lib/lockdown/resource.rb /^ def only(*methods)$/;" f class:Lockdown
|
99
|
+
orm_parent lib/lockdown/orms/active_record.rb /^ def orm_parent$/;" f class:Lockdown.Orms.Helper
|
100
|
+
path_from_hash lib/lockdown/frameworks/rails/controller.rb /^ def path_from_hash(hash)$/;" f class:Lockdown.Frameworks.Rails.Controller.Lock
|
101
|
+
permission lib/lockdown/access.rb /^ def permission(name, &block)$/;" f class:Lockdown.Access
|
102
|
+
permission lib/lockdown/configuration.rb /^ def permission(name)$/;" f class:Lockdown.Configuration
|
103
|
+
permission_assigned_automatically? lib/lockdown/configuration.rb /^ def permission_assigned_automatically?(name)$/;" f class:Lockdown.Configuration
|
104
|
+
permission_names lib/lockdown/configuration.rb /^ def permission_names$/;" f class:Lockdown.Configuration
|
105
|
+
project_root lib/lockdown/frameworks/rails.rb /^ def project_root$/;" f class:Lockdown.Frameworks.Environment
|
106
|
+
protected? lib/lockdown/permission.rb /^ def protected?$/;" f class:Lockdown.Permission
|
107
|
+
protected_access lib/lockdown/access.rb /^ def protected_access(*permissions)$/;" f class:Lockdown.Access
|
108
|
+
public? lib/lockdown/permission.rb /^ def public?$/;" f class:Lockdown.Permission
|
109
|
+
public_access lib/lockdown/access.rb /^ def public_access(*permissions)$/;" f class:Lockdown.Access
|
110
|
+
rails_mixin lib/lockdown.rb /^ def rails_mixin$/;" f class:Lockdown
|
111
|
+
redirect_back_or_default lib/lockdown/frameworks/rails/controller.rb /^ def redirect_back_or_default(default)$/;" f class:Lockdown.Frameworks.Rails.Controller.Lock
|
112
|
+
regex lib/lockdown/helper.rb /^ def regex(string)$/;" f class:Lockdown.Helper
|
113
|
+
regex lib/lockdown/resource.rb /^ def regex$/;" f class:Lockdown.Resource
|
114
|
+
regex_pattern lib/lockdown/permission.rb /^ def regex_pattern$/;" f class:Lockdown.Permission
|
115
|
+
regexes lib/lockdown/access.rb /^ def regexes(permissions)$/;" f class:Lockdown.Access
|
116
|
+
register_regex lib/lockdown/resource.rb /^ def register_regex(resource)$/;" f class:Lockdown.Resource
|
117
|
+
remote_url? lib/lockdown/frameworks/rails/controller.rb /^ def remote_url?(domain = nil)$/;" f class:Lockdown.Frameworks.Rails.Controller.Lock
|
118
|
+
remove_invalid_permissions lib/lockdown/database.rb /^ def remove_invalid_permissions(ug)$/;" f class:Lockdown.Database
|
119
|
+
reset lib/lockdown/configuration.rb /^ def reset$/;" f class:Lockdown.Configuration
|
120
|
+
reset_lockdown_session lib/lockdown/session.rb /^ def reset_lockdown_session$/;" f class:Lockdown.Session
|
121
|
+
resource lib/lockdown/permission.rb /^ def resource(name, &block)$/;" f class:Lockdown.Permission
|
122
|
+
sent_from_uri lib/lockdown/frameworks/rails/controller.rb /^ def sent_from_uri$/;" f class:Lockdown.Frameworks.Rails.Controller.Lock
|
123
|
+
session_access_rights lib/lockdown/session.rb /^ def session_access_rights$/;" f class:Lockdown.Session
|
124
|
+
set_current_user lib/lockdown/frameworks/rails/controller.rb /^ def set_current_user$/;" f class:Lockdown.Frameworks.Rails.Controller.Lock
|
125
|
+
skip_sync lib/lockdown/frameworks/rails.rb /^ def self.skip_sync?$/;" F class:Lockdown.Frameworks.Rails.mixin
|
126
|
+
skip_sync? lib/lockdown/configuration.rb /^ def skip_sync?$/;" f class:Lockdown.Configuration
|
127
|
+
store_location lib/lockdown/frameworks/rails/controller.rb /^ def store_location$/;" f class:Lockdown.Frameworks.Rails.Controller.Lock
|
128
|
+
sync_with_db lib/lockdown/database.rb /^ def sync_with_db$/;" f class:Lockdown.Database
|
129
|
+
update_with_stamps lib/lockdown/orms/active_record.rb /^ def update_with_stamps$/;" f class:Lockdown.Orms.Stamps
|
130
|
+
user_class lib/lockdown/helper.rb /^ def user_class$/;" f class:Lockdown.Helper
|
131
|
+
user_group lib/lockdown/access.rb /^ def user_group(name, *permissions)$/;" f class:Lockdown.Access
|
132
|
+
user_group lib/lockdown/configuration.rb /^ def user_group(name)$/;" f class:Lockdown.Configuration
|
133
|
+
user_group_class lib/lockdown/helper.rb /^ def user_group_class$/;" f class:Lockdown.Helper
|
134
|
+
user_group_id_reference lib/lockdown/helper.rb /^ def user_group_id_reference$/;" f class:Lockdown.Helper
|
135
|
+
user_group_names lib/lockdown/configuration.rb /^ def user_group_names$/;" f class:Lockdown.Configuration
|
136
|
+
user_group_permissions_names lib/lockdown/configuration.rb /^ def user_group_permissions_names(name)$/;" f class:Lockdown.Configuration
|
137
|
+
user_groups_hbtm_reference lib/lockdown/helper.rb /^ def user_groups_hbtm_reference$/;" f class:Lockdown.Helper
|
138
|
+
user_has_user_group? lib/lockdown/configuration.rb /^ def user_has_user_group?(user, name)$/;" f class:Lockdown.Configuration
|
139
|
+
user_id_reference lib/lockdown/helper.rb /^ def user_id_reference$/;" f class:Lockdown.Helper
|
140
|
+
users_hbtm_reference lib/lockdown/helper.rb /^ def users_hbtm_reference$/;" f class:Lockdown.Helper
|
141
|
+
version lib/lockdown.rb /^ def version$/;" f class:Lockdown
|
142
|
+
view_helper lib/lockdown/frameworks/rails.rb /^ def view_helper$/;" f class:Lockdown.Frameworks.Environment
|