lesli_shield 0.1.1 → 1.0.1
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/javascripts/lesli_shield/application.js +1 -4415
- data/app/assets/javascripts/lesli_shield/confirmations.js +1 -47
- data/app/assets/javascripts/lesli_shield/passwords.js +1 -699
- data/app/assets/javascripts/lesli_shield/registrations.js +1 -699
- data/app/assets/javascripts/lesli_shield/sessions.js +1 -699
- data/app/assets/stylesheets/lesli_shield/application.css +0 -3
- data/app/assets/stylesheets/lesli_shield/confirmations.css +0 -25828
- data/app/assets/stylesheets/lesli_shield/devise/oauth.css +1 -0
- data/app/assets/stylesheets/lesli_shield/passwords.css +1 -25812
- data/app/assets/stylesheets/lesli_shield/registrations.css +1 -26168
- data/app/assets/stylesheets/lesli_shield/sessions.css +1 -26168
- data/app/assets/stylesheets/lesli_shield/users.css +1 -0
- data/app/controllers/lesli_shield/application_controller.rb +2 -2
- data/app/controllers/lesli_shield/dashboards_controller.rb +8 -1
- data/app/controllers/lesli_shield/role/actions_controller.rb +46 -0
- data/app/controllers/lesli_shield/roles_controller.rb +182 -0
- data/app/controllers/lesli_shield/sessions_controller.rb +67 -0
- data/app/controllers/lesli_shield/settings_controller.rb +61 -0
- data/app/controllers/lesli_shield/users_controller.rb +90 -0
- data/app/controllers/users/confirmations_controller.rb +2 -1
- data/app/controllers/users/passwords_controller.rb +31 -35
- data/app/controllers/users/registrations_controller.rb +28 -33
- data/app/controllers/users/sessions_controller.rb +38 -48
- data/app/helpers/lesli_shield/sessions_helper.rb +4 -0
- data/app/helpers/lesli_shield/settings_helper.rb +4 -0
- data/app/helpers/lesli_shield/users_helper.rb +4 -0
- data/app/interfaces/lesli_shield/authentication_interface.rb +64 -0
- data/app/interfaces/lesli_shield/authorization_interface.rb +40 -0
- data/{db/migrate/v1/0801050210_create_lesli_shield_dashboard_components.rb → app/models/lesli_shield/account.rb} +8 -18
- data/app/models/lesli_shield/application_record.rb +3 -3
- data/app/models/lesli_shield/setting.rb +4 -0
- data/app/models/lesli_shield/user.rb +5 -0
- data/app/services/lesli_shield/tokens.rb +39 -0
- data/app/views/devise/confirmations/new.html.erb +14 -0
- data/app/views/devise/passwords/edit.html.erb +27 -69
- data/app/views/devise/passwords/new.html.erb +31 -73
- data/app/views/devise/registrations/new.html.erb +43 -97
- data/app/views/devise/sessions/new.html.erb +48 -68
- data/app/views/devise/shared/_demo.html.erb +6 -7
- data/app/views/devise/shared/_error_messages.html.erb +27 -13
- data/app/views/devise/shared/_links.html.erb +1 -1
- data/app/views/lesli_shield/dashboards/index.html.erb +8 -0
- data/app/views/lesli_shield/dashboards/show.html.erb +1 -1
- data/app/views/lesli_shield/partials/_navigation.html.erb +39 -0
- data/app/views/lesli_shield/roles/_form-information.html.erb +21 -0
- data/app/views/lesli_shield/roles/_form-privileges.html.erb +104 -0
- data/app/views/lesli_shield/roles/_session.html.erb +2 -0
- data/app/views/lesli_shield/roles/edit.html.erb +12 -0
- data/app/views/lesli_shield/roles/index.html.erb +45 -0
- data/app/views/lesli_shield/roles/new.html.erb +11 -0
- data/app/views/lesli_shield/roles/show.html.erb +13 -0
- data/app/views/lesli_shield/roles/update.turbo_stream.erb +3 -0
- data/app/views/lesli_shield/sessions/_form.html.erb +17 -0
- data/app/views/lesli_shield/sessions/_session.html.erb +2 -0
- data/app/views/lesli_shield/sessions/edit.html.erb +12 -0
- data/app/views/lesli_shield/sessions/index.html.erb +37 -0
- data/app/views/lesli_shield/sessions/new.html.erb +11 -0
- data/app/views/lesli_shield/sessions/show.html.erb +6 -0
- data/app/views/lesli_shield/settings/_form.html.erb +17 -0
- data/app/views/lesli_shield/settings/_setting.html.erb +2 -0
- data/app/views/lesli_shield/settings/edit.html.erb +12 -0
- data/app/views/lesli_shield/settings/index.html.erb +16 -0
- data/app/views/lesli_shield/settings/new.html.erb +11 -0
- data/app/views/lesli_shield/settings/show.html.erb +9 -0
- data/app/views/lesli_shield/users/_information-card.html.erb +49 -0
- data/app/views/lesli_shield/users/_information-form.html.erb +12 -0
- data/app/views/lesli_shield/users/_management-sessions.html.erb +27 -0
- data/app/views/lesli_shield/users/_viewer-activities.html.erb +5 -0
- data/app/views/lesli_shield/users/edit.html.erb +0 -0
- data/app/views/lesli_shield/users/index.html.erb +45 -0
- data/app/views/lesli_shield/users/new.html.erb +11 -0
- data/app/views/lesli_shield/users/show.html.erb +27 -0
- data/app/views/lesli_shield/users/update.turbo_stream.erb +3 -0
- data/config/locales/translations.en.yml +1 -22
- data/config/locales/translations.es.yml +1 -22
- data/config/locales/translations.fr.yml +1 -22
- data/config/locales/translations.it.yml +1 -22
- data/config/locales/translations.pt.yml +1 -22
- data/config/routes.rb +31 -7
- data/db/migrate/v1/0801000110_create_lesli_shield_accounts.rb +3 -8
- data/db/migrate/v1/0801001710_create_lesli_shield_settings.rb +37 -0
- data/db/migrate/v1/{0801050110_create_lesli_shield_dashboards.rb → 0801003010_create_lesli_shield_dashboards.rb} +3 -17
- data/db/migrate/v1/0801120310_create_lesli_shield_user_shortcuts.rb +44 -0
- data/db/migrate/v1/0801120410_create_lesli_shield_user_tokens.rb +46 -0
- data/lib/lesli_shield/engine.rb +1 -5
- data/lib/lesli_shield/routing.rb +0 -3
- data/lib/lesli_shield/version.rb +2 -2
- data/lib/scss/_devise-simple.scss +90 -0
- data/lib/scss/_devise.scss +162 -0
- data/lib/scss/application.scss +6 -0
- data/lib/scss/confirmations.scss +24 -24
- data/lib/scss/devise/oauth.scss +1 -1
- data/lib/scss/passwords.scss +4 -2
- data/lib/scss/registrations.scss +2 -2
- data/lib/scss/sessions.scss +2 -2
- data/lib/scss/users.scss +58 -0
- data/lib/tasks/lesli_shield_tasks.rake +49 -4
- data/lib/vue/application.js +7 -0
- data/lib/vue/apps/sessions/index.vue +50 -0
- data/lib/vue/stores/sessions.js +43 -0
- data/readme.md +32 -18
- metadata +67 -15
- data/app/views/layouts/lesli_shield/application.html.erb +0 -15
@@ -0,0 +1,43 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2022, all rights reserved.
|
3
|
+
|
4
|
+
All the information provided by this platform is protected by international laws related to
|
5
|
+
industrial property, intellectual property, copyright and relative international laws.
|
6
|
+
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
7
|
+
pictures and any other information belongs to the owner of this platform.
|
8
|
+
|
9
|
+
Without the written permission of the owner, any replication, modification,
|
10
|
+
transmission, publication is strictly forbidden.
|
11
|
+
|
12
|
+
For more information read the license file including with this software.
|
13
|
+
|
14
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
15
|
+
// ·
|
16
|
+
*/
|
17
|
+
|
18
|
+
|
19
|
+
// ·
|
20
|
+
import { defineStore } from "pinia"
|
21
|
+
|
22
|
+
|
23
|
+
// ·
|
24
|
+
export const useSessions = defineStore("shield.sessions", {
|
25
|
+
state: () => {
|
26
|
+
return {
|
27
|
+
sessions: {
|
28
|
+
pagination: {},
|
29
|
+
records: {}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
},
|
33
|
+
actions: {
|
34
|
+
|
35
|
+
get() {
|
36
|
+
this.http.get(this.url.shield("sessions")).then(result => {
|
37
|
+
this.sessions = result
|
38
|
+
}).catch(error => {
|
39
|
+
console.log(error)
|
40
|
+
})
|
41
|
+
}
|
42
|
+
}
|
43
|
+
})
|
data/readme.md
CHANGED
@@ -1,30 +1,42 @@
|
|
1
|
-
<
|
2
|
-
|
1
|
+
<div align="center" class="documentation-header">
|
2
|
+
<img width="100" alt="LesliShield logo" src="./app/assets/images/lesli_shield/shield-logo.svg" />
|
3
3
|
<h3 align="center">Authentication & Authorization for the Lesli Framework.</h3>
|
4
|
-
</
|
4
|
+
</div>
|
5
5
|
|
6
|
+
|
7
|
+
<br />
|
6
8
|
<hr/>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
</
|
9
|
+
|
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"/>
|
13
|
+
</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"/>
|
16
|
+
</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"/>
|
19
|
+
</a>
|
20
|
+
</div>
|
21
|
+
|
12
22
|
<hr/>
|
23
|
+
<br />
|
24
|
+
|
13
25
|
|
14
26
|
### Quick start
|
15
27
|
|
16
28
|
```shell
|
17
|
-
# Add LesliShield engine
|
29
|
+
# Add LesliShield engine gem
|
18
30
|
bundle add lesli_shield
|
19
31
|
```
|
20
32
|
|
21
33
|
```shell
|
22
|
-
# Setup database
|
34
|
+
# Setup & initialize the database
|
23
35
|
rake lesli:db:setup
|
24
36
|
```
|
25
37
|
|
26
38
|
```ruby
|
27
|
-
# Load LesliShield
|
39
|
+
# Load LesliShield engine
|
28
40
|
Rails.application.routes.draw do
|
29
41
|
mount LesliShield::Engine => "/shield"
|
30
42
|
end
|
@@ -32,21 +44,24 @@ end
|
|
32
44
|
|
33
45
|
|
34
46
|
### Documentation
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
### Lesli Documentation
|
35
51
|
* [website](https://www.lesli.dev/)
|
36
|
-
* [database](./docs/database.md)
|
37
52
|
* [documentation](https://www.lesli.dev/engines/shield/)
|
38
53
|
|
39
54
|
|
40
55
|
### Get in touch with Lesli
|
41
56
|
|
42
|
-
* [Website: https://www.lesli.tech](https://www.lesli.tech)
|
43
57
|
* [Email: hello@lesli.tech](hello@lesli.tech)
|
58
|
+
* [Website: https://www.lesli.tech](https://www.lesli.tech)
|
44
59
|
* [Twitter: @LesliTech](https://twitter.com/LesliTech)
|
45
60
|
|
46
61
|
|
47
62
|
### License
|
48
63
|
-------
|
49
|
-
Copyright (c)
|
64
|
+
Copyright (c) 2025, Lesli Technologies, S. A.
|
50
65
|
|
51
66
|
This program is free software: you can redistribute it and/or modify
|
52
67
|
it under the terms of the GNU General Public License as published by
|
@@ -64,8 +79,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
|
|
64
79
|
<hr />
|
65
80
|
<br />
|
66
81
|
|
67
|
-
<
|
82
|
+
<div align="center" class="has-text-centered">
|
68
83
|
<img width="200" alt="Lesli logo" src="https://cdn.lesli.tech/lesli/brand/app-logo.svg" />
|
69
|
-
<h4 align="center">Ruby on Rails SaaS Development Framework.</h4>
|
70
|
-
</
|
71
|
-
|
84
|
+
<h4 align="center" class="mt-0">Ruby on Rails SaaS Development Framework.</h4>
|
85
|
+
</div>
|
metadata
CHANGED
@@ -1,44 +1,44 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lesli_shield
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Lesli Development Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lesli
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '5'
|
19
|
+
version: '5.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '5'
|
26
|
+
version: '5.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: devise
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
description: Authentication & Authorization for the Lesli Framework.
|
40
|
+
version: '0'
|
41
|
+
description: Authentication & Authorization management for the Lesli Framework.
|
42
42
|
email:
|
43
43
|
- hello@lesli.tech
|
44
44
|
executables: []
|
@@ -55,12 +55,19 @@ files:
|
|
55
55
|
- app/assets/javascripts/lesli_shield/sessions.js
|
56
56
|
- app/assets/stylesheets/lesli_shield/application.css
|
57
57
|
- app/assets/stylesheets/lesli_shield/confirmations.css
|
58
|
+
- app/assets/stylesheets/lesli_shield/devise/oauth.css
|
58
59
|
- app/assets/stylesheets/lesli_shield/passwords.css
|
59
60
|
- app/assets/stylesheets/lesli_shield/registrations.css
|
60
61
|
- app/assets/stylesheets/lesli_shield/sessions.css
|
62
|
+
- app/assets/stylesheets/lesli_shield/users.css
|
61
63
|
- app/controllers/lesli_shield/application_controller.rb
|
62
64
|
- app/controllers/lesli_shield/dashboard/components_controller.rb
|
63
65
|
- app/controllers/lesli_shield/dashboards_controller.rb
|
66
|
+
- app/controllers/lesli_shield/role/actions_controller.rb
|
67
|
+
- app/controllers/lesli_shield/roles_controller.rb
|
68
|
+
- app/controllers/lesli_shield/sessions_controller.rb
|
69
|
+
- app/controllers/lesli_shield/settings_controller.rb
|
70
|
+
- app/controllers/lesli_shield/users_controller.rb
|
64
71
|
- app/controllers/users/confirmations_controller.rb
|
65
72
|
- app/controllers/users/omniauth_callbacks_controller.rb
|
66
73
|
- app/controllers/users/passwords_controller.rb
|
@@ -69,11 +76,20 @@ files:
|
|
69
76
|
- app/controllers/users/unlocks_controller.rb
|
70
77
|
- app/helpers/lesli_shield/application_helper.rb
|
71
78
|
- app/helpers/lesli_shield/dashboards_helper.rb
|
79
|
+
- app/helpers/lesli_shield/sessions_helper.rb
|
80
|
+
- app/helpers/lesli_shield/settings_helper.rb
|
81
|
+
- app/helpers/lesli_shield/users_helper.rb
|
82
|
+
- app/interfaces/lesli_shield/authentication_interface.rb
|
83
|
+
- app/interfaces/lesli_shield/authorization_interface.rb
|
72
84
|
- app/jobs/lesli_shield/application_job.rb
|
73
85
|
- app/mailers/lesli_shield/application_mailer.rb
|
86
|
+
- app/models/lesli_shield/account.rb
|
74
87
|
- app/models/lesli_shield/application_record.rb
|
75
88
|
- app/models/lesli_shield/dashboard.rb
|
76
89
|
- app/models/lesli_shield/dashboard/component.rb
|
90
|
+
- app/models/lesli_shield/setting.rb
|
91
|
+
- app/models/lesli_shield/user.rb
|
92
|
+
- app/services/lesli_shield/tokens.rb
|
77
93
|
- app/views/devise/confirmations/new.html.erb
|
78
94
|
- app/views/devise/confirmations/show.html.erb
|
79
95
|
- app/views/devise/mailer/confirmation_instructions.html.erb
|
@@ -90,11 +106,40 @@ files:
|
|
90
106
|
- app/views/devise/shared/_error_messages.html.erb
|
91
107
|
- app/views/devise/shared/_links.html.erb
|
92
108
|
- app/views/devise/unlocks/new.html.erb
|
93
|
-
- app/views/layouts/lesli_shield/application.html.erb
|
94
109
|
- app/views/lesli_shield/dashboards/edit.html.erb
|
95
110
|
- app/views/lesli_shield/dashboards/index.html.erb
|
96
111
|
- app/views/lesli_shield/dashboards/new.html.erb
|
97
112
|
- app/views/lesli_shield/dashboards/show.html.erb
|
113
|
+
- app/views/lesli_shield/partials/_navigation.html.erb
|
114
|
+
- app/views/lesli_shield/roles/_form-information.html.erb
|
115
|
+
- app/views/lesli_shield/roles/_form-privileges.html.erb
|
116
|
+
- app/views/lesli_shield/roles/_session.html.erb
|
117
|
+
- app/views/lesli_shield/roles/edit.html.erb
|
118
|
+
- app/views/lesli_shield/roles/index.html.erb
|
119
|
+
- app/views/lesli_shield/roles/new.html.erb
|
120
|
+
- app/views/lesli_shield/roles/show.html.erb
|
121
|
+
- app/views/lesli_shield/roles/update.turbo_stream.erb
|
122
|
+
- app/views/lesli_shield/sessions/_form.html.erb
|
123
|
+
- app/views/lesli_shield/sessions/_session.html.erb
|
124
|
+
- app/views/lesli_shield/sessions/edit.html.erb
|
125
|
+
- app/views/lesli_shield/sessions/index.html.erb
|
126
|
+
- app/views/lesli_shield/sessions/new.html.erb
|
127
|
+
- app/views/lesli_shield/sessions/show.html.erb
|
128
|
+
- app/views/lesli_shield/settings/_form.html.erb
|
129
|
+
- app/views/lesli_shield/settings/_setting.html.erb
|
130
|
+
- app/views/lesli_shield/settings/edit.html.erb
|
131
|
+
- app/views/lesli_shield/settings/index.html.erb
|
132
|
+
- app/views/lesli_shield/settings/new.html.erb
|
133
|
+
- app/views/lesli_shield/settings/show.html.erb
|
134
|
+
- app/views/lesli_shield/users/_information-card.html.erb
|
135
|
+
- app/views/lesli_shield/users/_information-form.html.erb
|
136
|
+
- app/views/lesli_shield/users/_management-sessions.html.erb
|
137
|
+
- app/views/lesli_shield/users/_viewer-activities.html.erb
|
138
|
+
- app/views/lesli_shield/users/edit.html.erb
|
139
|
+
- app/views/lesli_shield/users/index.html.erb
|
140
|
+
- app/views/lesli_shield/users/new.html.erb
|
141
|
+
- app/views/lesli_shield/users/show.html.erb
|
142
|
+
- app/views/lesli_shield/users/update.turbo_stream.erb
|
98
143
|
- config/initializers/devise.rb
|
99
144
|
- config/locales/translations.en.yml
|
100
145
|
- config/locales/translations.es.yml
|
@@ -103,25 +148,32 @@ files:
|
|
103
148
|
- config/locales/translations.pt.yml
|
104
149
|
- config/routes.rb
|
105
150
|
- db/migrate/v1/0801000110_create_lesli_shield_accounts.rb
|
106
|
-
- db/migrate/v1/
|
107
|
-
- db/migrate/v1/
|
151
|
+
- db/migrate/v1/0801001710_create_lesli_shield_settings.rb
|
152
|
+
- db/migrate/v1/0801003010_create_lesli_shield_dashboards.rb
|
153
|
+
- db/migrate/v1/0801120310_create_lesli_shield_user_shortcuts.rb
|
154
|
+
- db/migrate/v1/0801120410_create_lesli_shield_user_tokens.rb
|
108
155
|
- lib/lesli_shield.rb
|
109
156
|
- lib/lesli_shield/engine.rb
|
110
157
|
- lib/lesli_shield/routing.rb
|
111
158
|
- lib/lesli_shield/version.rb
|
159
|
+
- lib/scss/_devise-simple.scss
|
160
|
+
- lib/scss/_devise.scss
|
112
161
|
- lib/scss/application.scss
|
113
162
|
- lib/scss/confirmations.scss
|
114
163
|
- lib/scss/devise/oauth.scss
|
115
164
|
- lib/scss/passwords.scss
|
116
165
|
- lib/scss/registrations.scss
|
117
166
|
- lib/scss/sessions.scss
|
167
|
+
- lib/scss/users.scss
|
118
168
|
- lib/tasks/lesli_shield_tasks.rake
|
119
169
|
- lib/vue/application.js
|
120
170
|
- lib/vue/apps/dashboards/components/engine-version.vue
|
171
|
+
- lib/vue/apps/sessions/index.vue
|
121
172
|
- lib/vue/confirmations.js
|
122
173
|
- lib/vue/passwords.js
|
123
174
|
- lib/vue/registrations.js
|
124
175
|
- lib/vue/sessions.js
|
176
|
+
- lib/vue/stores/sessions.js
|
125
177
|
- lib/vue/stores/translations.json
|
126
178
|
- license
|
127
179
|
- readme.md
|
@@ -150,5 +202,5 @@ requirements: []
|
|
150
202
|
rubygems_version: 3.4.19
|
151
203
|
signing_key:
|
152
204
|
specification_version: 4
|
153
|
-
summary: Authentication & Authorization for the Lesli Framework.
|
205
|
+
summary: Authentication & Authorization management for the Lesli Framework.
|
154
206
|
test_files: []
|