super_auth 0.1.5 → 0.3.0
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.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile +3 -7
- data/Gemfile.lock +25 -14
- data/LICENSE.txt +125 -21
- data/README.md +32 -1
- data/Rakefile +0 -2
- data/USAGE.md +619 -0
- data/VISUALIZATION.md +58 -0
- data/app/controllers/super_auth/graph_controller.rb +661 -0
- data/app/views/super_auth/graph/index.html.erb +1408 -0
- data/config/routes.rb +73 -0
- data/db/migrate/1_users.rb +1 -0
- data/db/migrate/2_groups.rb +8 -1
- data/db/migrate/4_roles.rb +8 -1
- data/db/migrate/5_resources.rb +1 -0
- data/db/migrate/7_authorization.rb +2 -0
- data/db/migrate/8_add_indexes_to_edges.rb +17 -0
- data/db/migrate/9_add_by_current_user_index.rb +12 -0
- data/db/migrate_activerecord/20250101000001_create_super_auth_users.rb +10 -0
- data/db/migrate_activerecord/20250101000002_create_super_auth_groups.rb +11 -0
- data/db/migrate_activerecord/20250101000003_create_super_auth_permissions.rb +8 -0
- data/db/migrate_activerecord/20250101000004_create_super_auth_roles.rb +11 -0
- data/db/migrate_activerecord/20250101000005_create_super_auth_resources.rb +10 -0
- data/db/migrate_activerecord/20250101000006_create_super_auth_edges.rb +12 -0
- data/db/migrate_activerecord/20250101000007_create_super_auth_authorizations.rb +41 -0
- data/db/migrate_activerecord/20250101000009_add_by_current_user_index_to_super_auth_authorizations.rb +7 -0
- data/db/seeds/sample_data.rb +193 -0
- data/lib/basic_loader.rb +0 -2
- data/lib/generators/super_auth/install/install_generator.rb +19 -0
- data/lib/generators/super_auth/install/templates/README +29 -0
- data/lib/generators/super_auth/install/templates/super_auth.rb +7 -0
- data/lib/super_auth/active_record/by_current_user.rb +26 -11
- data/lib/super_auth/active_record/edge.rb +45 -0
- data/lib/super_auth/active_record/group.rb +7 -0
- data/lib/super_auth/active_record/permission.rb +4 -0
- data/lib/super_auth/active_record/resource.rb +1 -0
- data/lib/super_auth/active_record/role.rb +7 -0
- data/lib/super_auth/active_record/user.rb +6 -0
- data/lib/super_auth/active_record.rb +17 -0
- data/lib/super_auth/edge.rb +190 -131
- data/lib/super_auth/group.rb +1 -0
- data/lib/super_auth/nestable.rb +17 -10
- data/lib/super_auth/permission.rb +1 -1
- data/lib/super_auth/railtie.rb +26 -25
- data/lib/super_auth/role.rb +2 -1
- data/lib/super_auth/user.rb +8 -8
- data/lib/super_auth/version.rb +1 -3
- data/lib/super_auth.rb +72 -40
- data/super_auth.gemspec +35 -0
- data/visualization.html +747 -0
- metadata +24 -6
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: super_auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan Frias
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: sequel
|
|
@@ -53,6 +52,11 @@ files:
|
|
|
53
52
|
- LICENSE.txt
|
|
54
53
|
- README.md
|
|
55
54
|
- Rakefile
|
|
55
|
+
- USAGE.md
|
|
56
|
+
- VISUALIZATION.md
|
|
57
|
+
- app/controllers/super_auth/graph_controller.rb
|
|
58
|
+
- app/views/super_auth/graph/index.html.erb
|
|
59
|
+
- config/routes.rb
|
|
56
60
|
- db/migrate/1_users.rb
|
|
57
61
|
- db/migrate/2_groups.rb
|
|
58
62
|
- db/migrate/3_permissions.rb
|
|
@@ -60,7 +64,21 @@ files:
|
|
|
60
64
|
- db/migrate/5_resources.rb
|
|
61
65
|
- db/migrate/6_edge.rb
|
|
62
66
|
- db/migrate/7_authorization.rb
|
|
67
|
+
- db/migrate/8_add_indexes_to_edges.rb
|
|
68
|
+
- db/migrate/9_add_by_current_user_index.rb
|
|
69
|
+
- db/migrate_activerecord/20250101000001_create_super_auth_users.rb
|
|
70
|
+
- db/migrate_activerecord/20250101000002_create_super_auth_groups.rb
|
|
71
|
+
- db/migrate_activerecord/20250101000003_create_super_auth_permissions.rb
|
|
72
|
+
- db/migrate_activerecord/20250101000004_create_super_auth_roles.rb
|
|
73
|
+
- db/migrate_activerecord/20250101000005_create_super_auth_resources.rb
|
|
74
|
+
- db/migrate_activerecord/20250101000006_create_super_auth_edges.rb
|
|
75
|
+
- db/migrate_activerecord/20250101000007_create_super_auth_authorizations.rb
|
|
76
|
+
- db/migrate_activerecord/20250101000009_add_by_current_user_index_to_super_auth_authorizations.rb
|
|
77
|
+
- db/seeds/sample_data.rb
|
|
63
78
|
- lib/basic_loader.rb
|
|
79
|
+
- lib/generators/super_auth/install/install_generator.rb
|
|
80
|
+
- lib/generators/super_auth/install/templates/README
|
|
81
|
+
- lib/generators/super_auth/install/templates/super_auth.rb
|
|
64
82
|
- lib/super_auth.rb
|
|
65
83
|
- lib/super_auth/active_record.rb
|
|
66
84
|
- lib/super_auth/active_record/authorization.rb
|
|
@@ -82,6 +100,8 @@ files:
|
|
|
82
100
|
- lib/super_auth/user.rb
|
|
83
101
|
- lib/super_auth/version.rb
|
|
84
102
|
- lib/tasks/super_auth_tasks.rake
|
|
103
|
+
- super_auth.gemspec
|
|
104
|
+
- visualization.html
|
|
85
105
|
homepage: https://github.com/JonathanFrias/super_auth
|
|
86
106
|
licenses:
|
|
87
107
|
- MIT
|
|
@@ -89,7 +109,6 @@ metadata:
|
|
|
89
109
|
homepage_uri: https://github.com/JonathanFrias/super_auth
|
|
90
110
|
source_code_uri: https://github.com/JonathanFrias/super_auth
|
|
91
111
|
changelog_uri: https://github.com/JonathanFrias/super_auth/blob/main/CHANGELOG.md
|
|
92
|
-
post_install_message:
|
|
93
112
|
rdoc_options: []
|
|
94
113
|
require_paths:
|
|
95
114
|
- lib
|
|
@@ -104,8 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
104
123
|
- !ruby/object:Gem::Version
|
|
105
124
|
version: '0'
|
|
106
125
|
requirements: []
|
|
107
|
-
rubygems_version:
|
|
108
|
-
signing_key:
|
|
126
|
+
rubygems_version: 4.0.3
|
|
109
127
|
specification_version: 4
|
|
110
128
|
summary: Make Unauthenticated State Unrepresentable
|
|
111
129
|
test_files: []
|