vigilante 1.0.11 → 1.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/app/views/abilities/_ability_permission_fields.html.haml +4 -4
- data/app/views/abilities/show.html.haml +67 -67
- data/vigilante.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3f96733ce7e408ff0b4898584a59e02e9de3c34
|
4
|
+
data.tar.gz: efc94e4ef4df468d844279310de3ce068197bea3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e541628b696d2f01b60a65e260dbbd20c04c7c9e0dea12289d62aeda67862d786b4d123701384a154d080d69ddcb17be09999f45a9c6aecd7ce9dd34ad30ff2
|
7
|
+
data.tar.gz: 2879a5834be6ba0727cf07620651eab855d93d49d06991d032a09a779414d651e429f3256616451e24977f3119b8446dc69ea9e22412a31ceaebf40bdf4971a6
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.12
|
@@ -1,10 +1,10 @@
|
|
1
1
|
.nested-fields.ability-permission-fields
|
2
2
|
|
3
|
-
.row
|
4
|
-
.
|
3
|
+
.row
|
4
|
+
.col-sm-6
|
5
5
|
#permission_from_list
|
6
|
-
= f.association :permission, :collection => Permission.
|
7
|
-
.
|
6
|
+
= f.association :permission, :collection => Permission.order(:allowed_action), :prompt => 'Choose an existing permission', :label_method => :allowed_action
|
7
|
+
.col-sm-6
|
8
8
|
#actions-on-permission{:style => 'line-height: 20px; margin-top: 5px;'}
|
9
9
|
- if f.object.new_record?
|
10
10
|
= link_to_add_association 'or create a new permission', f, :permission
|
@@ -1,74 +1,74 @@
|
|
1
1
|
|
2
|
-
.
|
3
|
-
%
|
4
|
-
%
|
5
|
-
|
6
|
-
|
7
|
-
%
|
8
|
-
|
9
|
-
%td= @ability.description
|
2
|
+
%table.table
|
3
|
+
%tr
|
4
|
+
%th Name
|
5
|
+
%td= @ability.name
|
6
|
+
%tr
|
7
|
+
%th Description
|
8
|
+
%td= @ability.description
|
10
9
|
|
10
|
+
.row
|
11
|
+
.col-sm-8
|
12
|
+
%h2 Allowed actions
|
11
13
|
|
12
|
-
|
14
|
+
%table.table
|
15
|
+
- @ability.permissions.each do |perm|
|
16
|
+
%tr
|
17
|
+
%td= perm.allowed_action
|
13
18
|
|
14
|
-
|
15
|
-
- @ability.permissions.each do |perm|
|
16
|
-
%tr
|
17
|
-
%td= perm.allowed_action
|
19
|
+
= link_to 'Edit', edit_ability_path(@ability), :class => 'btn btn-mini' if is_allowed_to?(@ability, :edit)
|
18
20
|
|
19
|
-
|
21
|
+
.col-sm-4
|
22
|
+
#abilities_explanation.help_text.well.small.text-muted
|
23
|
+
%p
|
24
|
+
Allowed actions are specified as follows:
|
20
25
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
When abilities are assigned (authorisation), it is possible to specify the extent of the ability.
|
70
|
-
What this means depends on your website, but in case of e.g. a blog-host (like blogger), this means that a
|
71
|
-
%tt
|
72
|
-
author
|
73
|
-
's permissions could only be valid on those blogs he owns or has access to.
|
26
|
+
%ul
|
27
|
+
%li
|
28
|
+
%pre
|
29
|
+
posts[index, show]
|
30
|
+
%ul
|
31
|
+
%li
|
32
|
+
Only the things that are explicitly specified are allowed.
|
33
|
+
This declares that on the
|
34
|
+
%tt
|
35
|
+
PostsController
|
36
|
+
only
|
37
|
+
%tt
|
38
|
+
index
|
39
|
+
and
|
40
|
+
%tt
|
41
|
+
show
|
42
|
+
are allowed.
|
43
|
+
%li
|
44
|
+
%pre
|
45
|
+
*[index, show, report]
|
46
|
+
%ul
|
47
|
+
%li
|
48
|
+
We also allow wild-cards. Instead of a controller-name, we could write
|
49
|
+
%tt
|
50
|
+
*
|
51
|
+
which would mean the specified actions would apply to all controllers.
|
52
|
+
%li
|
53
|
+
%pre
|
54
|
+
posts[all]
|
55
|
+
%ul
|
56
|
+
%li
|
57
|
+
If we write
|
58
|
+
%tt
|
59
|
+
all
|
60
|
+
instead of a specific action or list of actions, then all actions are allowed for a given controller.
|
61
|
+
In this case a user has the ability to access all actions inside the posts_controller.
|
62
|
+
%li
|
63
|
+
%pre
|
64
|
+
*[all]
|
65
|
+
%ul
|
66
|
+
%li
|
67
|
+
By extension, this means a user has the ability to access all actions from all controllers.
|
68
|
+
%p
|
69
|
+
When abilities are assigned (authorisation), it is possible to specify the extent of the ability.
|
70
|
+
What this means depends on your website, but in case of e.g. a blog-host (like blogger), this means that a
|
71
|
+
%tt
|
72
|
+
author
|
73
|
+
's permissions could only be valid on those blogs he owns or has access to.
|
74
74
|
|
data/vigilante.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: vigilante 1.0.
|
5
|
+
# stub: vigilante 1.0.12 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "vigilante"
|
9
|
-
s.version = "1.0.
|
9
|
+
s.version = "1.0.12"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Nathan Van der Auwera"]
|
14
|
-
s.date = "2016-11-
|
14
|
+
s.date = "2016-11-28"
|
15
15
|
s.description = "Vigilante is a db-backed authorisation, completely configurable and dynamic; where permissions can be limited to extents."
|
16
16
|
s.email = "nathan@dixis.com"
|
17
17
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vigilante
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Van der Auwera
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|