lesli_shield 1.0.2 → 1.0.4

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 (115) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/lesli_shield/confirmations.css +18763 -0
  3. data/app/assets/stylesheets/lesli_shield/devise/oauth.css +32 -0
  4. data/app/assets/stylesheets/lesli_shield/passwords.css +18717 -1
  5. data/app/assets/stylesheets/lesli_shield/registrations.css +18804 -1
  6. data/app/assets/stylesheets/lesli_shield/sessions.css +18804 -1
  7. data/app/assets/stylesheets/lesli_shield/users.css +30 -0
  8. data/app/controllers/lesli_shield/dashboards_controller.rb +1 -8
  9. data/app/controllers/lesli_shield/invites_controller.rb +80 -0
  10. data/app/controllers/lesli_shield/role/actions_controller.rb +32 -20
  11. data/app/controllers/lesli_shield/roles_controller.rb +16 -8
  12. data/app/controllers/lesli_shield/sessions_controller.rb +5 -8
  13. data/app/controllers/lesli_shield/user/roles_controller.rb +62 -0
  14. data/app/controllers/lesli_shield/users_controller.rb +57 -20
  15. data/app/controllers/users/confirmations_controller.rb +42 -8
  16. data/app/controllers/users/passwords_controller.rb +52 -37
  17. data/app/controllers/users/registrations_controller.rb +2 -8
  18. data/app/controllers/users/sessions_controller.rb +57 -50
  19. data/app/helpers/lesli_shield/invites_helper.rb +4 -0
  20. data/app/helpers/lesli_shield/user/roles_helper.rb +4 -0
  21. data/app/interfaces/lesli_shield/authorization_interface.rb +8 -2
  22. data/app/mailers/lesli_shield/devise_mailer.rb +98 -0
  23. data/app/mailers/lesli_shield/invitation.html.erb +23 -0
  24. data/app/models/concerns/lesli_shield/user_security.rb +222 -0
  25. data/app/models/lesli_shield/account.rb +1 -1
  26. data/app/models/lesli_shield/dashboard.rb +1 -4
  27. data/app/models/lesli_shield/invite.rb +24 -0
  28. data/{lib/vue/confirmations.js → app/models/lesli_shield/role/action.rb} +17 -10
  29. data/{db/migrate/v1/0801003010_create_lesli_shield_dashboards.rb → app/models/lesli_shield/role/privilege.rb} +5 -4
  30. data/app/models/lesli_shield/user/role.rb +8 -0
  31. data/app/models/lesli_shield/user/session.rb +80 -0
  32. data/app/services/lesli_shield/invite_service.rb +43 -0
  33. data/app/services/lesli_shield/role_action_service.rb +118 -0
  34. data/app/services/lesli_shield/role_privilege_service.rb +112 -0
  35. data/app/{operators/lesli_shield/user_registration_operator.rb → services/lesli_shield/user_registration_service.rb} +26 -29
  36. data/app/services/lesli_shield/user_session_service.rb +78 -0
  37. data/app/services/lesli_shield/user_validator_service.rb +221 -0
  38. data/app/views/devise/confirmations/show.html.erb +4 -6
  39. data/app/views/devise/passwords/edit.html.erb +1 -2
  40. data/app/views/devise/passwords/new.html.erb +1 -1
  41. data/app/views/devise/registrations/new.html.erb +5 -4
  42. data/app/views/devise/sessions/new.html.erb +3 -2
  43. data/app/views/devise/shared/_application-devise-simple.erb +59 -0
  44. data/app/views/devise/shared/_application-devise.html.erb +76 -0
  45. data/app/views/lesli_shield/dashboards/_component-calendar.html.erb +1 -0
  46. data/app/views/lesli_shield/dashboards/_component-chart-bar.html.erb +6 -0
  47. data/app/views/lesli_shield/dashboards/_component-chart-line.html.erb +8 -0
  48. data/app/views/lesli_shield/dashboards/_component-count.html.erb +1 -0
  49. data/app/views/lesli_shield/dashboards/_component-date.html.erb +1 -0
  50. data/app/views/lesli_shield/dashboards/_component-weather.html.erb +1 -0
  51. data/app/views/lesli_shield/invites/_form.html.erb +10 -0
  52. data/app/views/lesli_shield/invites/_invite.html.erb +2 -0
  53. data/app/views/lesli_shield/invites/edit.html.erb +12 -0
  54. data/app/views/lesli_shield/invites/index.html.erb +66 -0
  55. data/{db/migrate/v1/0801001710_create_lesli_shield_settings.rb → app/views/lesli_shield/invites/new.html.erb} +9 -10
  56. data/{lib/vue/apps/dashboards/components/engine-version.vue → app/views/lesli_shield/invites/show.html.erb} +26 -43
  57. data/app/views/lesli_shield/partials/_navigation.html.erb +2 -4
  58. data/app/views/lesli_shield/{roles/_form-privileges.html.erb → role/actions/_form.html.erb} +5 -30
  59. data/app/views/lesli_shield/role/actions/index.html.erb +14 -0
  60. data/app/views/lesli_shield/roles/index.html.erb +2 -6
  61. data/app/views/lesli_shield/roles/new.html.erb +0 -11
  62. data/app/views/lesli_shield/roles/show.html.erb +5 -8
  63. data/app/views/lesli_shield/user/roles/_form.html.erb +17 -0
  64. data/app/views/lesli_shield/user/roles/_role.html.erb +2 -0
  65. data/app/views/lesli_shield/user/roles/edit.html.erb +12 -0
  66. data/app/views/lesli_shield/user/roles/index.html.erb +16 -0
  67. data/app/views/lesli_shield/user/roles/new.html.erb +11 -0
  68. data/app/views/lesli_shield/user/roles/show.html.erb +10 -0
  69. data/app/views/lesli_shield/users/{_viewer-activities.html.erb → _activities-viewer.html.erb} +2 -4
  70. data/app/views/lesli_shield/users/_information-card.html.erb +3 -3
  71. data/app/views/lesli_shield/users/_management-privileges.html.erb +74 -0
  72. data/app/views/lesli_shield/users/_management-security.html.erb +5 -0
  73. data/app/views/lesli_shield/users/index.html.erb +3 -7
  74. data/app/views/lesli_shield/users/new.html.erb +5 -11
  75. data/app/views/lesli_shield/users/show.html.erb +7 -5
  76. data/config/initializers/devise.rb +305 -304
  77. data/config/locales/translations.en.yml +4 -1
  78. data/config/locales/translations.es.yml +4 -1
  79. data/config/locales/translations.it.yml +4 -1
  80. data/config/routes.rb +7 -8
  81. data/db/migrate/v1/0801100210_create_lesli_shield_role_actions.rb +48 -0
  82. data/db/migrate/v1/0801100410_create_lesli_shield_role_privileges.rb +45 -0
  83. data/db/migrate/v1/0801110110_create_lesli_shield_user_roles.rb +43 -0
  84. data/db/migrate/v1/0801111210_create_lesli_shield_user_sessions.rb +56 -0
  85. data/db/migrate/v1/0801120110_create_lesli_shield_invites.rb +49 -0
  86. data/lib/lesli_shield/engine.rb +3 -3
  87. data/lib/lesli_shield/router.rb +21 -0
  88. data/lib/lesli_shield/version.rb +2 -2
  89. data/lib/lesli_shield.rb +1 -1
  90. data/lib/scss/_devise.scss +10 -0
  91. data/lib/scss/confirmations.scss +24 -24
  92. data/lib/tasks/lesli_shield_tasks.rake +1 -1
  93. data/readme.md +59 -20
  94. metadata +69 -44
  95. data/app/controllers/lesli_shield/dashboard/components_controller.rb +0 -60
  96. data/app/models/lesli_shield/dashboard/component.rb +0 -18
  97. data/app/views/lesli_shield/dashboards/edit.html.erb +0 -1
  98. data/app/views/lesli_shield/dashboards/index.html.erb +0 -9
  99. data/app/views/lesli_shield/dashboards/new.html.erb +0 -1
  100. data/app/views/lesli_shield/dashboards/show.html.erb +0 -1
  101. data/app/views/lesli_shield/roles/_session.html.erb +0 -2
  102. data/app/views/lesli_shield/roles/edit.html.erb +0 -12
  103. data/app/views/lesli_shield/roles/update.turbo_stream.erb +0 -3
  104. data/app/views/lesli_shield/users/update.turbo_stream.erb +0 -3
  105. data/lib/lesli_shield/routing.rb +0 -23
  106. data/lib/vue/application.js +0 -83
  107. data/lib/vue/apps/sessions/index.vue +0 -50
  108. data/lib/vue/passwords.js +0 -137
  109. data/lib/vue/registrations.js +0 -144
  110. data/lib/vue/sessions.js +0 -148
  111. data/lib/vue/stores/sessions.js +0 -43
  112. data/lib/vue/stores/translations.json +0 -162
  113. /data/app/views/lesli_shield/roles/{_form-information.html.erb → _form.html.erb} +0 -0
  114. /data/db/migrate/v1/{0801120310_create_lesli_shield_user_shortcuts.rb → 0801111010_create_lesli_shield_user_shortcuts.rb} +0 -0
  115. /data/db/migrate/v1/{0801120410_create_lesli_shield_user_tokens.rb → 0801111110_create_lesli_shield_user_tokens.rb} +0 -0
@@ -1,2 +1,5 @@
1
1
  ---
2
- :en: {}
2
+ :en:
3
+ lesli_shield:
4
+ devise/sessions:
5
+ message_not_valid_credentials: Not valid credentials
@@ -1,2 +1,5 @@
1
1
  ---
2
- :es: {}
2
+ :es:
3
+ lesli_shield:
4
+ devise/sessions:
5
+ message_not_valid_credentials: Credenciales no validas
@@ -1,2 +1,5 @@
1
1
  ---
2
- :it: {}
2
+ :it:
3
+ lesli_shield:
4
+ devise/sessions:
5
+ message_not_valid_credentials: ":lesli_shield.devise/sessions.message_not_valid_credentials:"
data/config/routes.rb CHANGED
@@ -44,10 +44,10 @@ Building a better future, one line of code at a time.
44
44
  # ·
45
45
  LesliShield::Engine.routes.draw do
46
46
 
47
- Lesli::Routing.mount_dashboard_for(LesliShield)
47
+ Lesli::Router.mount_lesli_engine_routes(self)
48
48
 
49
49
  resources :sessions, only: [:index, :show]
50
- resources :users, only: [:index, :show, :update] do
50
+ resources :users, only: [:index, :show, :update, :new, :create] do
51
51
 
52
52
  # extensions to the user methods
53
53
  scope module: :user do
@@ -56,7 +56,7 @@ LesliShield::Engine.routes.draw do
56
56
  resources :sessions, only: [:index, :destroy]
57
57
 
58
58
  # assign and remove roles to users
59
- resources :roles, only: [:index, :create, :destroy]
59
+ resources :roles, only: [:index, :create, :update, :destroy]
60
60
 
61
61
  # shortcuts
62
62
  resources :shortcuts, only: [:index, :create, :update, :destroy]
@@ -68,15 +68,14 @@ LesliShield::Engine.routes.draw do
68
68
 
69
69
  # Work with roles and privileges
70
70
  resources :roles, only: [:index, :show, :edit, :update, :new, :create, :destroy] do
71
- collection do
72
- get :list
71
+ member do
72
+ post :deploy
73
73
  end
74
74
  scope module: :role do
75
75
  resources :privileges
76
- resources :actions
76
+ resources :actions, only: [:index, :update, :destroy]
77
77
  end
78
78
  end
79
79
 
80
- #
81
- resource :settings, only: [:show]
80
+ resources :invites, only: [:index, :show, :new, :create, :update]
82
81
  end
@@ -0,0 +1,48 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2026, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by LesliTech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+ class CreateLesliShieldRoleActions < ActiveRecord::Migration[7.0]
34
+ def change
35
+ create_table :lesli_shield_role_actions do |t|
36
+ t.datetime :deleted_at, index: true
37
+ t.timestamps
38
+ end
39
+
40
+ add_reference(:lesli_shield_role_actions, :role, foreign_key: { to_table: :lesli_roles })
41
+ add_reference(:lesli_shield_role_actions, :action,
42
+ foreign_key: { to_table: :lesli_resources },
43
+ index: { name: "role_actions_resources" })
44
+
45
+ add_index(:lesli_shield_role_actions, [:role_id, :action_id], unique: true,
46
+ name: "index_role_actions_on_role_and_action")
47
+ end
48
+ end
@@ -0,0 +1,45 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2026, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by LesliTech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+ class CreateLesliShieldRolePrivileges < ActiveRecord::Migration[7.0]
34
+ def change
35
+ create_table :lesli_shield_role_privileges do |t|
36
+ t.string :controller
37
+ t.string :action
38
+ t.boolean :active
39
+ t.datetime :deleted_at, index: true
40
+ t.timestamps
41
+ end
42
+ add_reference(:lesli_shield_role_privileges, :role, foreign_key: { to_table: :lesli_roles })
43
+ add_index(:lesli_shield_role_privileges, %i[controller action role_id], unique: true, name: "shield_role_privileges_index")
44
+ end
45
+ end
@@ -0,0 +1,43 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2025, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by LesliTech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+ class CreateLesliShieldUserRoles < ActiveRecord::Migration[6.0]
34
+ def change
35
+ create_table :lesli_shield_user_roles do |t|
36
+ t.datetime :deleted_at, index: true
37
+ t.timestamps
38
+ end
39
+
40
+ add_reference(:lesli_shield_user_roles, :user, foreign_key: { to_table: :lesli_users })
41
+ add_reference(:lesli_shield_user_roles, :role, foreign_key: { to_table: :lesli_roles })
42
+ end
43
+ end
@@ -0,0 +1,56 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2025, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by LesliTech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+ class CreateLesliShieldUserSessions < ActiveRecord::Migration[6.0]
34
+ def change
35
+ create_table :lesli_shield_user_sessions do |t|
36
+
37
+ t.string :remote # IPv4 and IPv6 hosts and networks
38
+
39
+ t.string :agent_platform
40
+ t.string :agent_os
41
+ t.string :agent_browser
42
+ t.string :agent_version
43
+
44
+ t.string :session_token # authentication token
45
+ t.string :session_source # session created for/with
46
+
47
+ t.integer :usage_count # total number of interactions
48
+ t.datetime :last_used_at # last datetime token was used
49
+ t.datetime :expiration_at, index: true # auto-expire session at
50
+ t.datetime :deleted_at, index: true
51
+
52
+ t.timestamps
53
+ end
54
+ add_reference(:lesli_shield_user_sessions, :user, foreign_key: { to_table: :lesli_users })
55
+ end
56
+ end
@@ -0,0 +1,49 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2026, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by LesliTech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+ class CreateLesliShieldInvites < ActiveRecord::Migration[8.0]
34
+ def change
35
+ create_table :lesli_shield_invites do |t|
36
+ t.string :email, null: false
37
+ t.string :full_name
38
+ t.string :telephone
39
+ t.text :notes
40
+ t.integer :status, index: true
41
+ t.datetime :sent_at, index: true
42
+ t.datetime :expired_at, index: true
43
+ t.datetime :deleted_at, index: true
44
+ t.timestamps
45
+ end
46
+ add_reference(:lesli_shield_invites, :user, foreign_key: { to_table: :lesli_users })
47
+ add_reference(:lesli_shield_invites, :account, foreign_key: { to_table: :lesli_shield_accounts })
48
+ end
49
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Lesli
4
4
 
5
- Copyright (c) 2023, Lesli Technologies, S. A.
5
+ Copyright (c) 2025, Lesli Technologies, S. A.
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -19,11 +19,11 @@ along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
20
  Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
- Made with ♥ by https://www.lesli.tech
22
+ Made with ♥ by LesliTech
23
23
  Building a better future, one line of code at a time.
24
24
 
25
25
  @contact hello@lesli.tech
26
- @website https://www.lesli.dev
26
+ @website https://www.lesli.tech
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
@@ -0,0 +1,21 @@
1
+ module LesliShield
2
+ module Router
3
+ def self.mount_login_at(router, path="")
4
+ router.devise_for :users, class_name: "Lesli::User", module: :devise,
5
+ :path => path,
6
+ :path_names => {
7
+ :sign_in => "login",
8
+ :sign_out => "logout",
9
+ :sign_up => "register",
10
+ :password => "password",
11
+ :confirmation => "confirmation"
12
+ },
13
+ :controllers => {
14
+ :registrations => "users/registrations",
15
+ :confirmations => "users/confirmations",
16
+ :passwords => "users/passwords",
17
+ :sessions => "users/sessions"
18
+ }
19
+ end
20
+ end
21
+ end
@@ -1,4 +1,4 @@
1
1
  module LesliShield
2
- VERSION = "1.0.2"
3
- BUILD = "1754919086"
2
+ VERSION = "1.0.4"
3
+ BUILD = "1771710537"
4
4
  end
data/lib/lesli_shield.rb CHANGED
@@ -1,6 +1,6 @@
1
- require "lesli_shield/routing"
2
1
  require "lesli_shield/version"
3
2
  require "lesli_shield/engine"
3
+ require "lesli_shield/router"
4
4
  module LesliShield
5
5
  # Your code goes here...
6
6
  end
@@ -37,6 +37,16 @@ Building a better future, one line of code at a time.
37
37
  @use "LesliAssets/lib/lesli_assets_styles/templates/public";
38
38
 
39
39
 
40
+ // · Configuration & variables
41
+ @use "LesliAssets/lib/lesli_assets_styles/settings/variables";
42
+
43
+
44
+ // · headings and links
45
+ h1, h2, h3, h4, h5, h6, a {
46
+ font-family: "Domine", variables.$family-primary;
47
+ }
48
+
49
+
40
50
  // ·
41
51
  .shield-form-demo {
42
52
  width: 100%;
@@ -32,27 +32,27 @@ Building a better future, one line of code at a time.
32
32
 
33
33
 
34
34
  // ·
35
- // @import "Lesli/scss/pages/devise-simple";
36
-
37
-
38
- // // ·
39
- // div.confirmation-message {
40
- // //box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
41
- // padding: 4rem 0 5rem;
42
- // text-align: center;
43
- // max-width: 800px;
44
- // margin: 0 auto;
45
- // width: 90%;
46
-
47
- // svg {
48
- // max-width: 90px;
49
- // margin-bottom: 1rem;
50
- // fill: lesli-css-color(lime, 300);
51
- // }
52
-
53
- // p {
54
- // font-weight: 100;
55
- // font-size: 2rem;
56
- // }
57
-
58
- // }
35
+ @use "lesli-css" as lesli;
36
+ @use "devise-simple";
37
+
38
+
39
+ // ·
40
+ div.confirmation-message {
41
+ //box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
42
+ padding: 4rem 0 5rem;
43
+ text-align: center;
44
+ max-width: 800px;
45
+ margin: 0 auto;
46
+ width: 90%;
47
+
48
+ svg {
49
+ max-width: 90px;
50
+ margin-bottom: 1rem;
51
+ fill: lesli.lesli-color(lime, 300);
52
+ }
53
+
54
+ p {
55
+ font-size: 2rem;
56
+ }
57
+
58
+ }
@@ -42,7 +42,7 @@ namespace :lesli_shield do
42
42
 
43
43
  Lesli::Role.all.each do |role|
44
44
  L2.info("LesliShield: Syncing privileges for #{role.name} role.")
45
- Lesli::RoleOperator.new(role).synchronize
45
+ LesliShield::RolePrivilegeService.new(nil).synchronize(role)
46
46
  end
47
47
  end
48
48
  end
data/readme.md CHANGED
@@ -1,36 +1,42 @@
1
- <div align="center" class="documentation-header">
1
+ <div align="center">
2
2
  <img width="100" alt="LesliShield logo" src="./app/assets/images/lesli_shield/shield-logo.svg" />
3
- <h3 align="center">Authentication & Authorization for the Lesli Framework.</h3>
3
+ <h3 align="center">Administration area for the Lesli Framework.</h3>
4
4
  </div>
5
5
 
6
-
7
6
  <br />
8
7
  <hr/>
9
8
 
10
- <div align="center" class="documentation-statics">
11
- <a target="blank" href="https://rubygems.org/gems/lesli">
12
- <img height="22" alt="Gem Version" src="https://badge.fury.io/rb/lesli.svg"/>
9
+ <div align="center">
10
+ <a target="_blank" href="https://github.com/LesliTech/LesliShield/actions">
11
+ <img alt="Tests passing" src="https://img.shields.io/badge/Tests-passing-green?style=for-the-badge&logo=github">
13
12
  </a>
14
- <a class="mx-2" href="https://codecov.io/github/LesliTech/Lesli">
15
- <img height="22" src="https://codecov.io/github/LesliTech/Lesli/graph/badge.svg?token=2O12NENK5Y"/>
13
+ <a target="_blank" href="https://rubygems.org/gems/lesli_shield">
14
+ <img alt="Gem Version" src="https://img.shields.io/gem/v/lesli_shield?style=for-the-badge&logo=ruby">
16
15
  </a>
17
- <a href="https://codecov.io/github/LesliTech/LesliBabel">
18
- <img height="22" src="https://sonarcloud.io/api/project_badges/measure?project=LesliTech_LesliBabel&metric=sqale_rating"/>
16
+ <a target="_blank" href="https://codecov.io/github/LesliTech/LesliShield">
17
+ <img alt="Codecov" src="https://img.shields.io/codecov/c/github/LesliTech/LesliShield?style=for-the-badge&logo=codecov">
19
18
  </a>
20
19
  </div>
21
20
 
22
21
  <hr/>
23
22
  <br />
24
23
 
24
+ <div align="center">
25
+ <img
26
+ style="width:100%;max-width:800px;border-radius:6px;"
27
+ alt="Lesli screenshot" src="./docs/images/screenshot.png" />
28
+ </div>
29
+
30
+ <br />
31
+ <hr/>
32
+ <br />
25
33
 
26
- ### Quick start
34
+ ### Installation
27
35
 
28
36
  ```shell
29
37
  # Add LesliShield engine gem
30
38
  bundle add lesli_shield
31
- ```
32
39
 
33
- ```shell
34
40
  # Setup & initialize the database
35
41
  rake lesli:db:setup
36
42
  ```
@@ -42,26 +48,52 @@ Rails.application.routes.draw do
42
48
  end
43
49
  ```
44
50
 
51
+ <br />
52
+ <hr/>
53
+ <br />
45
54
 
46
- ### Documentation
55
+ ### Development
56
+
57
+ ```shell
58
+ # clone the lesli repo inside your engine folder: RailsApp/engines
59
+ git clone https://github.com/LesliTech/LesliShield.git
60
+
61
+ # Load LesliShield as a Gem
62
+ gem "lesli", path: "engines/LesliShield"
63
+
64
+ # Install the necessary Gems to run LesliShield
65
+ bundle install
47
66
 
67
+ # Setup & initialize the database
68
+ rake lesli:db:setup
69
+
70
+ ```
71
+
72
+ <br />
73
+ <hr/>
74
+ <br />
48
75
 
76
+ ### Demo
49
77
 
50
- ### Lesli Documentation
78
+ * [online demo](https://demo.lesli.dev/)
79
+ * [docker demo](https://github.com/LesliTech/lesli-docker-demo)
80
+
81
+
82
+ ### Documentation
51
83
  * [website](https://www.lesli.dev/)
52
- * [documentation](https://www.lesli.dev/engines/shield/)
84
+ * [documentation](https://www.lesli.dev/engines/shield)
53
85
 
54
86
 
55
- ### Get in touch with Lesli
87
+ ### Connect with Lesli
56
88
 
89
+ * [X: @LesliTech](https://x.com/LesliTech)
57
90
  * [Email: hello@lesli.tech](hello@lesli.tech)
58
91
  * [Website: https://www.lesli.tech](https://www.lesli.tech)
59
- * [Twitter: @LesliTech](https://twitter.com/LesliTech)
60
92
 
61
93
 
62
94
  ### License
63
95
  -------
64
- Copyright (c) 2025, Lesli Technologies, S. A.
96
+ Copyright (c) 2026, Lesli Technologies, S. A.
65
97
 
66
98
  This program is free software: you can redistribute it and/or modify
67
99
  it under the terms of the GNU General Public License as published by
@@ -76,10 +108,17 @@ GNU General Public License for more details.
76
108
  You should have received a copy of the GNU General Public License
77
109
  along with this program. If not, see http://www.gnu.org/licenses/.
78
110
 
111
+ <br />
79
112
  <hr />
80
113
  <br />
114
+ <br />
81
115
 
82
116
  <div align="center" class="has-text-centered">
83
117
  <img width="200" alt="Lesli logo" src="https://cdn.lesli.tech/lesli/brand/app-logo.svg" />
84
- <h4 align="center" class="mt-0">Ruby on Rails SaaS Development Framework.</h4>
118
+ <h3 align="center" class="mt-0">
119
+ The Open-Source SaaS Development Framework for Ruby on Rails.
120
+ </h3>
85
121
  </div>
122
+
123
+ <br />
124
+ <br />