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.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/lesli_shield/confirmations.css +18763 -0
- data/app/assets/stylesheets/lesli_shield/devise/oauth.css +32 -0
- data/app/assets/stylesheets/lesli_shield/passwords.css +18717 -1
- data/app/assets/stylesheets/lesli_shield/registrations.css +18804 -1
- data/app/assets/stylesheets/lesli_shield/sessions.css +18804 -1
- data/app/assets/stylesheets/lesli_shield/users.css +30 -0
- data/app/controllers/lesli_shield/dashboards_controller.rb +1 -8
- data/app/controllers/lesli_shield/invites_controller.rb +80 -0
- data/app/controllers/lesli_shield/role/actions_controller.rb +32 -20
- data/app/controllers/lesli_shield/roles_controller.rb +16 -8
- data/app/controllers/lesli_shield/sessions_controller.rb +5 -8
- data/app/controllers/lesli_shield/user/roles_controller.rb +62 -0
- data/app/controllers/lesli_shield/users_controller.rb +57 -20
- data/app/controllers/users/confirmations_controller.rb +42 -8
- data/app/controllers/users/passwords_controller.rb +52 -37
- data/app/controllers/users/registrations_controller.rb +2 -8
- data/app/controllers/users/sessions_controller.rb +57 -50
- data/app/helpers/lesli_shield/invites_helper.rb +4 -0
- data/app/helpers/lesli_shield/user/roles_helper.rb +4 -0
- data/app/interfaces/lesli_shield/authorization_interface.rb +8 -2
- data/app/mailers/lesli_shield/devise_mailer.rb +98 -0
- data/app/mailers/lesli_shield/invitation.html.erb +23 -0
- data/app/models/concerns/lesli_shield/user_security.rb +222 -0
- data/app/models/lesli_shield/account.rb +1 -1
- data/app/models/lesli_shield/dashboard.rb +1 -4
- data/app/models/lesli_shield/invite.rb +24 -0
- data/{lib/vue/confirmations.js → app/models/lesli_shield/role/action.rb} +17 -10
- data/{db/migrate/v1/0801003010_create_lesli_shield_dashboards.rb → app/models/lesli_shield/role/privilege.rb} +5 -4
- data/app/models/lesli_shield/user/role.rb +8 -0
- data/app/models/lesli_shield/user/session.rb +80 -0
- data/app/services/lesli_shield/invite_service.rb +43 -0
- data/app/services/lesli_shield/role_action_service.rb +118 -0
- data/app/services/lesli_shield/role_privilege_service.rb +112 -0
- data/app/{operators/lesli_shield/user_registration_operator.rb → services/lesli_shield/user_registration_service.rb} +26 -29
- data/app/services/lesli_shield/user_session_service.rb +78 -0
- data/app/services/lesli_shield/user_validator_service.rb +221 -0
- data/app/views/devise/confirmations/show.html.erb +4 -6
- data/app/views/devise/passwords/edit.html.erb +1 -2
- data/app/views/devise/passwords/new.html.erb +1 -1
- data/app/views/devise/registrations/new.html.erb +5 -4
- data/app/views/devise/sessions/new.html.erb +3 -2
- data/app/views/devise/shared/_application-devise-simple.erb +59 -0
- data/app/views/devise/shared/_application-devise.html.erb +76 -0
- data/app/views/lesli_shield/dashboards/_component-calendar.html.erb +1 -0
- data/app/views/lesli_shield/dashboards/_component-chart-bar.html.erb +6 -0
- data/app/views/lesli_shield/dashboards/_component-chart-line.html.erb +8 -0
- data/app/views/lesli_shield/dashboards/_component-count.html.erb +1 -0
- data/app/views/lesli_shield/dashboards/_component-date.html.erb +1 -0
- data/app/views/lesli_shield/dashboards/_component-weather.html.erb +1 -0
- data/app/views/lesli_shield/invites/_form.html.erb +10 -0
- data/app/views/lesli_shield/invites/_invite.html.erb +2 -0
- data/app/views/lesli_shield/invites/edit.html.erb +12 -0
- data/app/views/lesli_shield/invites/index.html.erb +66 -0
- data/{db/migrate/v1/0801001710_create_lesli_shield_settings.rb → app/views/lesli_shield/invites/new.html.erb} +9 -10
- data/{lib/vue/apps/dashboards/components/engine-version.vue → app/views/lesli_shield/invites/show.html.erb} +26 -43
- data/app/views/lesli_shield/partials/_navigation.html.erb +2 -4
- data/app/views/lesli_shield/{roles/_form-privileges.html.erb → role/actions/_form.html.erb} +5 -30
- data/app/views/lesli_shield/role/actions/index.html.erb +14 -0
- data/app/views/lesli_shield/roles/index.html.erb +2 -6
- data/app/views/lesli_shield/roles/new.html.erb +0 -11
- data/app/views/lesli_shield/roles/show.html.erb +5 -8
- data/app/views/lesli_shield/user/roles/_form.html.erb +17 -0
- data/app/views/lesli_shield/user/roles/_role.html.erb +2 -0
- data/app/views/lesli_shield/user/roles/edit.html.erb +12 -0
- data/app/views/lesli_shield/user/roles/index.html.erb +16 -0
- data/app/views/lesli_shield/user/roles/new.html.erb +11 -0
- data/app/views/lesli_shield/user/roles/show.html.erb +10 -0
- data/app/views/lesli_shield/users/{_viewer-activities.html.erb → _activities-viewer.html.erb} +2 -4
- data/app/views/lesli_shield/users/_information-card.html.erb +3 -3
- data/app/views/lesli_shield/users/_management-privileges.html.erb +74 -0
- data/app/views/lesli_shield/users/_management-security.html.erb +5 -0
- data/app/views/lesli_shield/users/index.html.erb +3 -7
- data/app/views/lesli_shield/users/new.html.erb +5 -11
- data/app/views/lesli_shield/users/show.html.erb +7 -5
- data/config/initializers/devise.rb +305 -304
- data/config/locales/translations.en.yml +4 -1
- data/config/locales/translations.es.yml +4 -1
- data/config/locales/translations.it.yml +4 -1
- data/config/routes.rb +7 -8
- data/db/migrate/v1/0801100210_create_lesli_shield_role_actions.rb +48 -0
- data/db/migrate/v1/0801100410_create_lesli_shield_role_privileges.rb +45 -0
- data/db/migrate/v1/0801110110_create_lesli_shield_user_roles.rb +43 -0
- data/db/migrate/v1/0801111210_create_lesli_shield_user_sessions.rb +56 -0
- data/db/migrate/v1/0801120110_create_lesli_shield_invites.rb +49 -0
- data/lib/lesli_shield/engine.rb +3 -3
- data/lib/lesli_shield/router.rb +21 -0
- data/lib/lesli_shield/version.rb +2 -2
- data/lib/lesli_shield.rb +1 -1
- data/lib/scss/_devise.scss +10 -0
- data/lib/scss/confirmations.scss +24 -24
- data/lib/tasks/lesli_shield_tasks.rake +1 -1
- data/readme.md +59 -20
- metadata +69 -44
- data/app/controllers/lesli_shield/dashboard/components_controller.rb +0 -60
- data/app/models/lesli_shield/dashboard/component.rb +0 -18
- data/app/views/lesli_shield/dashboards/edit.html.erb +0 -1
- data/app/views/lesli_shield/dashboards/index.html.erb +0 -9
- data/app/views/lesli_shield/dashboards/new.html.erb +0 -1
- data/app/views/lesli_shield/dashboards/show.html.erb +0 -1
- data/app/views/lesli_shield/roles/_session.html.erb +0 -2
- data/app/views/lesli_shield/roles/edit.html.erb +0 -12
- data/app/views/lesli_shield/roles/update.turbo_stream.erb +0 -3
- data/app/views/lesli_shield/users/update.turbo_stream.erb +0 -3
- data/lib/lesli_shield/routing.rb +0 -23
- data/lib/vue/application.js +0 -83
- data/lib/vue/apps/sessions/index.vue +0 -50
- data/lib/vue/passwords.js +0 -137
- data/lib/vue/registrations.js +0 -144
- data/lib/vue/sessions.js +0 -148
- data/lib/vue/stores/sessions.js +0 -43
- data/lib/vue/stores/translations.json +0 -162
- /data/app/views/lesli_shield/roles/{_form-information.html.erb → _form.html.erb} +0 -0
- /data/db/migrate/v1/{0801120310_create_lesli_shield_user_shortcuts.rb → 0801111010_create_lesli_shield_user_shortcuts.rb} +0 -0
- /data/db/migrate/v1/{0801120410_create_lesli_shield_user_tokens.rb → 0801111110_create_lesli_shield_user_tokens.rb} +0 -0
metadata
CHANGED
|
@@ -1,44 +1,45 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lesli_shield
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- The Lesli Development Team
|
|
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: lesli
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- - "
|
|
16
|
+
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
18
|
version: '5.0'
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
|
-
- - "
|
|
23
|
+
- - "~>"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
25
|
version: '5.0'
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: devise
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
|
-
- - "
|
|
30
|
+
- - "~>"
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
32
|
+
version: '5.0'
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
|
-
- - "
|
|
37
|
+
- - "~>"
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
41
|
-
description:
|
|
39
|
+
version: '5.0'
|
|
40
|
+
description: "Provides a complete authentication and authorization solution for The
|
|
41
|
+
Lesli Framework, \nincluding user session management, secure login and logout, role-based
|
|
42
|
+
access control, \nand permission handling.\n"
|
|
42
43
|
email:
|
|
43
44
|
- hello@lesli.tech
|
|
44
45
|
executables: []
|
|
@@ -61,12 +62,13 @@ files:
|
|
|
61
62
|
- app/assets/stylesheets/lesli_shield/sessions.css
|
|
62
63
|
- app/assets/stylesheets/lesli_shield/users.css
|
|
63
64
|
- app/controllers/lesli_shield/application_controller.rb
|
|
64
|
-
- app/controllers/lesli_shield/dashboard/components_controller.rb
|
|
65
65
|
- app/controllers/lesli_shield/dashboards_controller.rb
|
|
66
|
+
- app/controllers/lesli_shield/invites_controller.rb
|
|
66
67
|
- app/controllers/lesli_shield/role/actions_controller.rb
|
|
67
68
|
- app/controllers/lesli_shield/roles_controller.rb
|
|
68
69
|
- app/controllers/lesli_shield/sessions_controller.rb
|
|
69
70
|
- app/controllers/lesli_shield/settings_controller.rb
|
|
71
|
+
- app/controllers/lesli_shield/user/roles_controller.rb
|
|
70
72
|
- app/controllers/lesli_shield/users_controller.rb
|
|
71
73
|
- app/controllers/users/confirmations_controller.rb
|
|
72
74
|
- app/controllers/users/omniauth_callbacks_controller.rb
|
|
@@ -76,21 +78,35 @@ files:
|
|
|
76
78
|
- app/controllers/users/unlocks_controller.rb
|
|
77
79
|
- app/helpers/lesli_shield/application_helper.rb
|
|
78
80
|
- app/helpers/lesli_shield/dashboards_helper.rb
|
|
81
|
+
- app/helpers/lesli_shield/invites_helper.rb
|
|
79
82
|
- app/helpers/lesli_shield/sessions_helper.rb
|
|
80
83
|
- app/helpers/lesli_shield/settings_helper.rb
|
|
84
|
+
- app/helpers/lesli_shield/user/roles_helper.rb
|
|
81
85
|
- app/helpers/lesli_shield/users_helper.rb
|
|
82
86
|
- app/interfaces/lesli_shield/authentication_interface.rb
|
|
83
87
|
- app/interfaces/lesli_shield/authorization_interface.rb
|
|
84
88
|
- app/jobs/lesli_shield/application_job.rb
|
|
85
89
|
- app/mailers/lesli_shield/application_mailer.rb
|
|
90
|
+
- app/mailers/lesli_shield/devise_mailer.rb
|
|
91
|
+
- app/mailers/lesli_shield/invitation.html.erb
|
|
92
|
+
- app/models/concerns/lesli_shield/user_security.rb
|
|
86
93
|
- app/models/lesli_shield/account.rb
|
|
87
94
|
- app/models/lesli_shield/application_record.rb
|
|
88
95
|
- app/models/lesli_shield/dashboard.rb
|
|
89
|
-
- app/models/lesli_shield/
|
|
96
|
+
- app/models/lesli_shield/invite.rb
|
|
97
|
+
- app/models/lesli_shield/role/action.rb
|
|
98
|
+
- app/models/lesli_shield/role/privilege.rb
|
|
90
99
|
- app/models/lesli_shield/setting.rb
|
|
91
100
|
- app/models/lesli_shield/user.rb
|
|
92
|
-
- app/
|
|
101
|
+
- app/models/lesli_shield/user/role.rb
|
|
102
|
+
- app/models/lesli_shield/user/session.rb
|
|
103
|
+
- app/services/lesli_shield/invite_service.rb
|
|
104
|
+
- app/services/lesli_shield/role_action_service.rb
|
|
105
|
+
- app/services/lesli_shield/role_privilege_service.rb
|
|
93
106
|
- app/services/lesli_shield/tokens.rb
|
|
107
|
+
- app/services/lesli_shield/user_registration_service.rb
|
|
108
|
+
- app/services/lesli_shield/user_session_service.rb
|
|
109
|
+
- app/services/lesli_shield/user_validator_service.rb
|
|
94
110
|
- app/views/devise/confirmations/new.html.erb
|
|
95
111
|
- app/views/devise/confirmations/show.html.erb
|
|
96
112
|
- app/views/devise/mailer/confirmation_instructions.html.erb
|
|
@@ -103,23 +119,31 @@ files:
|
|
|
103
119
|
- app/views/devise/registrations/edit.html.erb
|
|
104
120
|
- app/views/devise/registrations/new.html.erb
|
|
105
121
|
- app/views/devise/sessions/new.html.erb
|
|
122
|
+
- app/views/devise/shared/_application-devise-simple.erb
|
|
123
|
+
- app/views/devise/shared/_application-devise.html.erb
|
|
106
124
|
- app/views/devise/shared/_demo.html.erb
|
|
107
125
|
- app/views/devise/shared/_error_messages.html.erb
|
|
108
126
|
- app/views/devise/shared/_links.html.erb
|
|
109
127
|
- app/views/devise/unlocks/new.html.erb
|
|
110
|
-
- app/views/lesli_shield/dashboards/
|
|
111
|
-
- app/views/lesli_shield/dashboards/
|
|
112
|
-
- app/views/lesli_shield/dashboards/
|
|
113
|
-
- app/views/lesli_shield/dashboards/
|
|
128
|
+
- app/views/lesli_shield/dashboards/_component-calendar.html.erb
|
|
129
|
+
- app/views/lesli_shield/dashboards/_component-chart-bar.html.erb
|
|
130
|
+
- app/views/lesli_shield/dashboards/_component-chart-line.html.erb
|
|
131
|
+
- app/views/lesli_shield/dashboards/_component-count.html.erb
|
|
132
|
+
- app/views/lesli_shield/dashboards/_component-date.html.erb
|
|
133
|
+
- app/views/lesli_shield/dashboards/_component-weather.html.erb
|
|
134
|
+
- app/views/lesli_shield/invites/_form.html.erb
|
|
135
|
+
- app/views/lesli_shield/invites/_invite.html.erb
|
|
136
|
+
- app/views/lesli_shield/invites/edit.html.erb
|
|
137
|
+
- app/views/lesli_shield/invites/index.html.erb
|
|
138
|
+
- app/views/lesli_shield/invites/new.html.erb
|
|
139
|
+
- app/views/lesli_shield/invites/show.html.erb
|
|
114
140
|
- app/views/lesli_shield/partials/_navigation.html.erb
|
|
115
|
-
- app/views/lesli_shield/
|
|
116
|
-
- app/views/lesli_shield/
|
|
117
|
-
- app/views/lesli_shield/roles/
|
|
118
|
-
- app/views/lesli_shield/roles/edit.html.erb
|
|
141
|
+
- app/views/lesli_shield/role/actions/_form.html.erb
|
|
142
|
+
- app/views/lesli_shield/role/actions/index.html.erb
|
|
143
|
+
- app/views/lesli_shield/roles/_form.html.erb
|
|
119
144
|
- app/views/lesli_shield/roles/index.html.erb
|
|
120
145
|
- app/views/lesli_shield/roles/new.html.erb
|
|
121
146
|
- app/views/lesli_shield/roles/show.html.erb
|
|
122
|
-
- app/views/lesli_shield/roles/update.turbo_stream.erb
|
|
123
147
|
- app/views/lesli_shield/sessions/_form.html.erb
|
|
124
148
|
- app/views/lesli_shield/sessions/_session.html.erb
|
|
125
149
|
- app/views/lesli_shield/sessions/edit.html.erb
|
|
@@ -132,15 +156,22 @@ files:
|
|
|
132
156
|
- app/views/lesli_shield/settings/index.html.erb
|
|
133
157
|
- app/views/lesli_shield/settings/new.html.erb
|
|
134
158
|
- app/views/lesli_shield/settings/show.html.erb
|
|
159
|
+
- app/views/lesli_shield/user/roles/_form.html.erb
|
|
160
|
+
- app/views/lesli_shield/user/roles/_role.html.erb
|
|
161
|
+
- app/views/lesli_shield/user/roles/edit.html.erb
|
|
162
|
+
- app/views/lesli_shield/user/roles/index.html.erb
|
|
163
|
+
- app/views/lesli_shield/user/roles/new.html.erb
|
|
164
|
+
- app/views/lesli_shield/user/roles/show.html.erb
|
|
165
|
+
- app/views/lesli_shield/users/_activities-viewer.html.erb
|
|
135
166
|
- app/views/lesli_shield/users/_information-card.html.erb
|
|
136
167
|
- app/views/lesli_shield/users/_information-form.html.erb
|
|
168
|
+
- app/views/lesli_shield/users/_management-privileges.html.erb
|
|
169
|
+
- app/views/lesli_shield/users/_management-security.html.erb
|
|
137
170
|
- app/views/lesli_shield/users/_management-sessions.html.erb
|
|
138
|
-
- app/views/lesli_shield/users/_viewer-activities.html.erb
|
|
139
171
|
- app/views/lesli_shield/users/edit.html.erb
|
|
140
172
|
- app/views/lesli_shield/users/index.html.erb
|
|
141
173
|
- app/views/lesli_shield/users/new.html.erb
|
|
142
174
|
- app/views/lesli_shield/users/show.html.erb
|
|
143
|
-
- app/views/lesli_shield/users/update.turbo_stream.erb
|
|
144
175
|
- config/initializers/devise.rb
|
|
145
176
|
- config/locales/translations.en.yml
|
|
146
177
|
- config/locales/translations.es.yml
|
|
@@ -149,13 +180,16 @@ files:
|
|
|
149
180
|
- config/locales/translations.pt.yml
|
|
150
181
|
- config/routes.rb
|
|
151
182
|
- db/migrate/v1/0801000110_create_lesli_shield_accounts.rb
|
|
152
|
-
- db/migrate/v1/
|
|
153
|
-
- db/migrate/v1/
|
|
154
|
-
- db/migrate/v1/
|
|
155
|
-
- db/migrate/v1/
|
|
183
|
+
- db/migrate/v1/0801100210_create_lesli_shield_role_actions.rb
|
|
184
|
+
- db/migrate/v1/0801100410_create_lesli_shield_role_privileges.rb
|
|
185
|
+
- db/migrate/v1/0801110110_create_lesli_shield_user_roles.rb
|
|
186
|
+
- db/migrate/v1/0801111010_create_lesli_shield_user_shortcuts.rb
|
|
187
|
+
- db/migrate/v1/0801111110_create_lesli_shield_user_tokens.rb
|
|
188
|
+
- db/migrate/v1/0801111210_create_lesli_shield_user_sessions.rb
|
|
189
|
+
- db/migrate/v1/0801120110_create_lesli_shield_invites.rb
|
|
156
190
|
- lib/lesli_shield.rb
|
|
157
191
|
- lib/lesli_shield/engine.rb
|
|
158
|
-
- lib/lesli_shield/
|
|
192
|
+
- lib/lesli_shield/router.rb
|
|
159
193
|
- lib/lesli_shield/version.rb
|
|
160
194
|
- lib/scss/_devise-simple.scss
|
|
161
195
|
- lib/scss/_devise.scss
|
|
@@ -167,25 +201,17 @@ files:
|
|
|
167
201
|
- lib/scss/sessions.scss
|
|
168
202
|
- lib/scss/users.scss
|
|
169
203
|
- lib/tasks/lesli_shield_tasks.rake
|
|
170
|
-
- lib/vue/application.js
|
|
171
|
-
- lib/vue/apps/dashboards/components/engine-version.vue
|
|
172
|
-
- lib/vue/apps/sessions/index.vue
|
|
173
|
-
- lib/vue/confirmations.js
|
|
174
|
-
- lib/vue/passwords.js
|
|
175
|
-
- lib/vue/registrations.js
|
|
176
|
-
- lib/vue/sessions.js
|
|
177
|
-
- lib/vue/stores/sessions.js
|
|
178
|
-
- lib/vue/stores/translations.json
|
|
179
204
|
- license
|
|
180
205
|
- readme.md
|
|
181
206
|
homepage: https://www.lesli.dev/
|
|
182
207
|
licenses:
|
|
183
|
-
- GPL-3.0
|
|
208
|
+
- GPL-3.0-or-later
|
|
184
209
|
metadata:
|
|
185
210
|
homepage_uri: https://www.lesli.dev/
|
|
186
|
-
changelog_uri: https://github.com/LesliTech/LesliShield
|
|
211
|
+
changelog_uri: https://github.com/LesliTech/LesliShield/releases
|
|
187
212
|
source_code_uri: https://github.com/LesliTech/LesliShield
|
|
188
|
-
|
|
213
|
+
bug_tracker_uri: https://github.com/LesliTech/LesliShield/issues
|
|
214
|
+
documentation_uri: https://www.lesli.dev/engines/shield/
|
|
189
215
|
rdoc_options: []
|
|
190
216
|
require_paths:
|
|
191
217
|
- lib
|
|
@@ -200,8 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
200
226
|
- !ruby/object:Gem::Version
|
|
201
227
|
version: '0'
|
|
202
228
|
requirements: []
|
|
203
|
-
rubygems_version: 3.
|
|
204
|
-
signing_key:
|
|
229
|
+
rubygems_version: 3.7.1
|
|
205
230
|
specification_version: 4
|
|
206
|
-
summary:
|
|
231
|
+
summary: Users & security management for the Lesli Framework.
|
|
207
232
|
test_files: []
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
module LesliShield
|
|
2
|
-
class Dashboard::ComponentsController < ApplicationController
|
|
3
|
-
before_action :set_dashboard_component, only: %i[ show edit update destroy ]
|
|
4
|
-
|
|
5
|
-
# GET /dashboard/components
|
|
6
|
-
def index
|
|
7
|
-
@dashboard_components = Dashboard::Component.all
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
# GET /dashboard/components/1
|
|
11
|
-
def show
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# GET /dashboard/components/new
|
|
15
|
-
def new
|
|
16
|
-
@dashboard_component = Dashboard::Component.new
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
# GET /dashboard/components/1/edit
|
|
20
|
-
def edit
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
# POST /dashboard/components
|
|
24
|
-
def create
|
|
25
|
-
@dashboard_component = Dashboard::Component.new(dashboard_component_params)
|
|
26
|
-
|
|
27
|
-
if @dashboard_component.save
|
|
28
|
-
redirect_to @dashboard_component, notice: "Component was successfully created."
|
|
29
|
-
else
|
|
30
|
-
render :new, status: :unprocessable_entity
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# PATCH/PUT /dashboard/components/1
|
|
35
|
-
def update
|
|
36
|
-
if @dashboard_component.update(dashboard_component_params)
|
|
37
|
-
redirect_to @dashboard_component, notice: "Component was successfully updated.", status: :see_other
|
|
38
|
-
else
|
|
39
|
-
render :edit, status: :unprocessable_entity
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# DELETE /dashboard/components/1
|
|
44
|
-
def destroy
|
|
45
|
-
@dashboard_component.destroy
|
|
46
|
-
redirect_to dashboard_components_url, notice: "Component was successfully destroyed.", status: :see_other
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
private
|
|
50
|
-
# Use callbacks to share common setup or constraints between actions.
|
|
51
|
-
def set_dashboard_component
|
|
52
|
-
@dashboard_component = Dashboard::Component.find(params[:id])
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
# Only allow a list of trusted parameters through.
|
|
56
|
-
def dashboard_component_params
|
|
57
|
-
params.fetch(:dashboard_component, {})
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
module LesliShield
|
|
2
|
-
class Dashboard::Component < ApplicationRecord
|
|
3
|
-
|
|
4
|
-
belongs_to :dashboard, inverse_of: :components
|
|
5
|
-
|
|
6
|
-
def self.component_ids
|
|
7
|
-
["audit-users", "audit-roles"]
|
|
8
|
-
end
|
|
9
|
-
# components_ids: {
|
|
10
|
-
# list_new_tickets: "list_new_tickets",
|
|
11
|
-
# list_my_tickets: "list_my_tickets",
|
|
12
|
-
# list_unassigned_tickets: "list_unassigned_tickets",
|
|
13
|
-
# chart_tickets_by_type: "chart_tickets_by_type",
|
|
14
|
-
# chart_tickets_by_category: "chart_tickets_by_category",
|
|
15
|
-
# hours_worked: "hours_worked"
|
|
16
|
-
# }
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<router-view></router-view>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<router-view></router-view>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<%= render("/lesli/shared/dashboards/show") %>
|
data/lib/lesli_shield/routing.rb
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
module LesliShield
|
|
2
|
-
module Routing
|
|
3
|
-
def self.mount_login_at path=""
|
|
4
|
-
Rails.application.routes.draw do
|
|
5
|
-
devise_for :users, class_name: "Lesli::User", module: :devise,
|
|
6
|
-
:path => path,
|
|
7
|
-
:path_names => {
|
|
8
|
-
:sign_in => "login",
|
|
9
|
-
:sign_out => "logout",
|
|
10
|
-
:sign_up => "register",
|
|
11
|
-
:password => "password",
|
|
12
|
-
:confirmation => "confirmation"
|
|
13
|
-
},
|
|
14
|
-
:controllers => {
|
|
15
|
-
:registrations => "users/registrations",
|
|
16
|
-
:confirmations => "users/confirmations",
|
|
17
|
-
:passwords => "users/passwords",
|
|
18
|
-
:sessions => "users/sessions"
|
|
19
|
-
}
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
data/lib/vue/application.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Lesli
|
|
3
|
-
|
|
4
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
5
|
-
|
|
6
|
-
This program is free software: you can redistribute it and/or modify
|
|
7
|
-
it under the terms of the GNU General Public License as published by
|
|
8
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
(at your option) any later version.
|
|
10
|
-
|
|
11
|
-
This program is distributed in the hope that it will be useful,
|
|
12
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
GNU General Public License for more details.
|
|
15
|
-
|
|
16
|
-
You should have received a copy of the GNU General Public License
|
|
17
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
|
|
19
|
-
Lesli · Ruby on Rails SaaS Development Framework.
|
|
20
|
-
|
|
21
|
-
Made with ♥ by LesliTech
|
|
22
|
-
Building a better future, one line of code at a time.
|
|
23
|
-
|
|
24
|
-
@contact hello@lesli.tech
|
|
25
|
-
@website https://www.lesli.tech
|
|
26
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
27
|
-
|
|
28
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
29
|
-
// ·
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// · Import Lesli builders
|
|
34
|
-
import application from "Lesli/vue/application"
|
|
35
|
-
import translation from "Lesli/vue/translation"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
// · Import engine translations
|
|
39
|
-
import translations from "LesliShield/vue/stores/translations.json"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// ·
|
|
43
|
-
import appDashboardShow from "Lesli/vue/shared/dashboards/apps/show.vue"
|
|
44
|
-
import appDashboardEdit from "Lesli/vue/shared/dashboards/apps/edit.vue"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
// ·
|
|
48
|
-
import appSessionIndex from "LesliShield/vue/apps/sessions/index.vue"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// ·
|
|
52
|
-
import componentDashboardEngineVersion from "LesliShield/vue/apps/dashboards/components/engine-version.vue"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
// ·
|
|
56
|
-
const dashboardProps = {
|
|
57
|
-
components: {
|
|
58
|
-
"engine-version": componentDashboardEngineVersion
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
// · Buil Lesli translations
|
|
64
|
-
translation(translations)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
// · Build a new Lesli application
|
|
68
|
-
application("LesliShield", [{
|
|
69
|
-
path: "/",
|
|
70
|
-
component: appDashboardShow,
|
|
71
|
-
props: dashboardProps
|
|
72
|
-
}, {
|
|
73
|
-
path: "/dashboard",
|
|
74
|
-
component: appDashboardShow,
|
|
75
|
-
props: dashboardProps
|
|
76
|
-
}, {
|
|
77
|
-
path: "/dashboards/:id/edit",
|
|
78
|
-
component: appDashboardEdit,
|
|
79
|
-
props: dashboardProps
|
|
80
|
-
}, {
|
|
81
|
-
path: "/sessions",
|
|
82
|
-
component: appSessionIndex
|
|
83
|
-
}])
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
|
|
3
|
-
import { onMounted } from "vue"
|
|
4
|
-
import { useSessions } from "LesliShield/vue/stores/sessions"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// · implement stores
|
|
8
|
-
const storeSessions = useSessions()
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// ·
|
|
13
|
-
const columns = [{
|
|
14
|
-
field: "id",
|
|
15
|
-
label: "ID"
|
|
16
|
-
}, {
|
|
17
|
-
field: "first_name",
|
|
18
|
-
label: "User name"
|
|
19
|
-
}, {
|
|
20
|
-
field: "session_source",
|
|
21
|
-
label: "Source"
|
|
22
|
-
}, {
|
|
23
|
-
field: "created_at_string",
|
|
24
|
-
label: "Created at"
|
|
25
|
-
}, {
|
|
26
|
-
field: "last_used_at_string",
|
|
27
|
-
label: "Last used at"
|
|
28
|
-
}, {
|
|
29
|
-
field: "device",
|
|
30
|
-
label: "Device"
|
|
31
|
-
}]
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// ·
|
|
35
|
-
onMounted(() => {
|
|
36
|
-
storeSessions.get()
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
</script>
|
|
40
|
-
<template>
|
|
41
|
-
<lesli-application-container>
|
|
42
|
-
<lesli-header title="Sessions"></lesli-header>
|
|
43
|
-
<lesli-toolbar></lesli-toolbar>
|
|
44
|
-
<lesli-table
|
|
45
|
-
:columns="columns"
|
|
46
|
-
:records="storeSessions.sessions.records"
|
|
47
|
-
:pagination="storeSessions.sessions.pagination">
|
|
48
|
-
</lesli-table>
|
|
49
|
-
</lesli-application-container>
|
|
50
|
-
</template>
|
data/lib/vue/passwords.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Lesli
|
|
3
|
-
|
|
4
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
5
|
-
|
|
6
|
-
This program is free software: you can redistribute it and/or modify
|
|
7
|
-
it under the terms of the GNU General Public License as published by
|
|
8
|
-
the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
(at your option) any later version.
|
|
10
|
-
|
|
11
|
-
This program is distributed in the hope that it will be useful,
|
|
12
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
GNU General Public License for more details.
|
|
15
|
-
|
|
16
|
-
You should have received a copy of the GNU General Public License
|
|
17
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
|
|
19
|
-
Lesli · Ruby on Rails SaaS Development Framework.
|
|
20
|
-
|
|
21
|
-
Made with ♥ by https://www.lesli.tech
|
|
22
|
-
Building a better future, one line of code at a time.
|
|
23
|
-
|
|
24
|
-
@contact hello@lesli.tech
|
|
25
|
-
@website https://www.lesli.tech
|
|
26
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
27
|
-
|
|
28
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
29
|
-
// ·
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
// ·
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// ·
|
|
37
|
-
import application from "Lesli/vue/public"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// ·
|
|
41
|
-
application({
|
|
42
|
-
|
|
43
|
-
data() {
|
|
44
|
-
return {
|
|
45
|
-
loading: false,
|
|
46
|
-
translations: {
|
|
47
|
-
main: {}
|
|
48
|
-
},
|
|
49
|
-
sign_in: {
|
|
50
|
-
email: "",
|
|
51
|
-
password: ""
|
|
52
|
-
},
|
|
53
|
-
password_edit: {
|
|
54
|
-
new_password: "",
|
|
55
|
-
new_password_confirmation: ""
|
|
56
|
-
},
|
|
57
|
-
notification: {
|
|
58
|
-
message: "",
|
|
59
|
-
show: false,
|
|
60
|
-
type: ""
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
methods: {
|
|
65
|
-
|
|
66
|
-
postPasswordNew(event) {
|
|
67
|
-
|
|
68
|
-
this.notification.show = false
|
|
69
|
-
|
|
70
|
-
this.loading = true
|
|
71
|
-
|
|
72
|
-
event.preventDefault();
|
|
73
|
-
|
|
74
|
-
let data = {
|
|
75
|
-
user: {
|
|
76
|
-
email: this.sign_in.email.toLowerCase(),
|
|
77
|
-
password: this.sign_in.password
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
this.http.post("/password", data).then(response => {
|
|
82
|
-
this.showNotification("this.translations.main.notification_reset_password_instructions_sent", "success")
|
|
83
|
-
}).catch(error => {
|
|
84
|
-
this.showNotification(error.message)
|
|
85
|
-
}).finally(() => {
|
|
86
|
-
this.loading = false
|
|
87
|
-
})
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
putPasswordEdit(event) {
|
|
91
|
-
|
|
92
|
-
this.notification.show = false
|
|
93
|
-
|
|
94
|
-
this.loading = true
|
|
95
|
-
|
|
96
|
-
event.preventDefault();
|
|
97
|
-
|
|
98
|
-
// check if passwords match
|
|
99
|
-
if (this.password_edit.new_password != this.password_edit.new_password_confirmation) {
|
|
100
|
-
this.showNotification("this.translations.main.error_passwords_do_not_match", "danger")
|
|
101
|
-
return
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
var token=null
|
|
105
|
-
|
|
106
|
-
try {
|
|
107
|
-
token = Object.fromEntries(new URLSearchParams(window.location.search)).reset_password_token
|
|
108
|
-
} catch (error) {
|
|
109
|
-
token=null
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
this.http.put("/password", {
|
|
113
|
-
user: {
|
|
114
|
-
password: this.password_edit.new_password,
|
|
115
|
-
password_confirmation: this.password_edit.new_password_confirmation,
|
|
116
|
-
reset_password_token: token
|
|
117
|
-
}
|
|
118
|
-
}).then(response => {
|
|
119
|
-
this.showNotification("this.translations.main.notification_password_updated", "success")
|
|
120
|
-
//setTimeout(() => { this.url.go("/login") }, 2000)
|
|
121
|
-
}).catch(error => {
|
|
122
|
-
this.showNotification(error.message, "danger")
|
|
123
|
-
}).finally(() => {
|
|
124
|
-
this.loading = false
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
showNotification(message, type="danger"){
|
|
130
|
-
this.notification.message = message;
|
|
131
|
-
this.notification.type = "is-"+type;
|
|
132
|
-
this.notification.show = true;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
})
|