super_auth 0.4.0 → 0.8.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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +90 -0
  3. data/Gemfile +5 -0
  4. data/Gemfile.lock +8 -1
  5. data/README.md +132 -49
  6. data/USAGE.md +98 -31
  7. data/config/routes.rb +9 -71
  8. data/db/migrate/10_add_super_auth_label_to_resources.rb +13 -0
  9. data/db/migrate/11_add_parent_id_to_resources.rb +32 -0
  10. data/db/migrate_activerecord/20250101000010_add_super_auth_label_to_super_auth_resources.rb +5 -0
  11. data/db/migrate_activerecord/20250101000011_add_parent_id_to_super_auth_resources.rb +9 -0
  12. data/db/seeds/sample_data.rb +1 -0
  13. data/exe/super_auth-editor +9 -0
  14. data/lib/generators/super_auth/install/templates/README +18 -11
  15. data/lib/generators/super_auth/rls/templates/migration.rb.erb +2 -0
  16. data/lib/super_auth/active_record/authorization.rb +7 -0
  17. data/lib/super_auth/active_record/by_current_user.rb +1 -1
  18. data/lib/super_auth/active_record/resource.rb +45 -0
  19. data/lib/super_auth/active_record/user.rb +3 -1
  20. data/lib/super_auth/authorization.rb +24 -0
  21. data/lib/super_auth/edge.rb +54 -18
  22. data/lib/super_auth/editor/cli.rb +91 -0
  23. data/lib/super_auth/editor/index.html +430 -0
  24. data/lib/super_auth/editor/seed.rb +176 -0
  25. data/lib/super_auth/editor.rb +288 -0
  26. data/lib/super_auth/nestable.rb +16 -3
  27. data/lib/super_auth/railtie.rb +9 -2
  28. data/lib/super_auth/resource.rb +57 -0
  29. data/lib/super_auth/rls.rb +164 -34
  30. data/lib/super_auth/user.rb +3 -1
  31. data/lib/super_auth/version.rb +1 -1
  32. data/lib/super_auth.rb +73 -5
  33. data/lib/tasks/super_auth_tasks.rake +28 -0
  34. metadata +13 -8
  35. data/VISUALIZATION.md +0 -58
  36. data/app/controllers/super_auth/graph_controller.rb +0 -654
  37. data/app/views/super_auth/graph/index.html.erb +0 -1408
  38. data/super_auth.gemspec +0 -35
  39. data/visualization.html +0 -747
data/super_auth.gemspec DELETED
@@ -1,35 +0,0 @@
1
- require_relative "lib/super_auth/version"
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = "super_auth"
5
- spec.version = SuperAuth::VERSION
6
- spec.authors = ["Jonathan Frias"]
7
- spec.email = ["jonathan@gofrias.com"]
8
-
9
- spec.summary = "Make Unauthenticated State Unrepresentable"
10
- spec.description = "Simple, yet super powerful authorization for you application"
11
- spec.homepage = "https://github.com/JonathanFrias/super_auth"
12
- spec.license = "GPL-2.0"
13
- spec.required_ruby_version = ">= 2.6.0"
14
-
15
- spec.metadata["homepage_uri"] = spec.homepage
16
- spec.metadata["source_code_uri"] = "https://github.com/JonathanFrias/super_auth"
17
- spec.metadata["changelog_uri"] = "https://github.com/JonathanFrias/super_auth/blob/main/CHANGELOG.md"
18
-
19
- # Specify which files should be added to the gem when it is released.
20
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
- spec.files = Dir.chdir(__dir__) do
22
- `git ls-files -z`.split("\x0").reject do |f|
23
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
24
- end
25
- end
26
- spec.bindir = "bin"
27
- spec.executables = spec.files.grep(%r{\Abin/}) { |f| File.basename(f) }
28
- spec.require_paths = ["lib"]
29
-
30
- # Uncomment to register a new dependency of your gem
31
- spec.add_dependency "sequel"
32
- spec.add_development_dependency "sqlite3"
33
- # For more information and examples about making a new gem, check out our
34
- # guide at: https://bundler.io/guides/creating_gem.html
35
- end