lesli 5.0.1 → 5.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/config/lesli_manifest.js +7 -4
- data/app/assets/fonts/lesli/Domine/Domine-VariableFont_wght.ttf +0 -0
- data/app/assets/fonts/lesli/Domine/OFL.txt +2 -0
- data/app/assets/javascripts/lesli/users/passwords.js +776 -0
- data/app/assets/javascripts/lesli/users/registrations.js +776 -0
- data/app/assets/javascripts/lesli/users/sessions.js +776 -1
- data/app/assets/stylesheets/lesli/users/passwords.scss +5 -6
- data/app/assets/stylesheets/lesli/users/registrations.scss +5 -6
- data/app/assets/stylesheets/lesli/users/sessions.scss +5 -10
- data/app/controllers/lesli/abouts_controller.rb +66 -0
- data/app/controllers/lesli/application_lesli_controller.rb +0 -1
- data/app/controllers/lesli/interfaces/application/logger.rb +9 -9
- data/app/controllers/lesli/roles_controller.rb +43 -0
- data/{lib/sass/lesli/devise/registrations.scss.erb → app/controllers/lesli/users_controller.rb} +18 -23
- data/app/controllers/users/registrations_controller.rb +137 -58
- data/app/helpers/lesli/assets_helper.rb +2 -2
- data/app/helpers/lesli/general_helper.rb +1 -1
- data/app/helpers/lesli/navigation_helper.rb +7 -10
- data/app/helpers/lesli/system_helper.rb +1 -1
- data/app/lib/lesli/system.rb +7 -3
- data/app/mailers/lesli/application_lesli_mailer.rb +199 -0
- data/app/mailers/lesli/application_mailer.rb +7 -0
- data/app/mailers/lesli/devise_mailer.rb +33 -0
- data/app/models/concerns/user_guard.rb +3 -4
- data/app/models/lesli/account.rb +29 -0
- data/{lib/sass/lesli/pages/passes.scss → app/models/lesli/descriptor.rb} +14 -8
- data/app/models/lesli/role.rb +90 -0
- data/app/models/lesli/system_controller.rb +1 -0
- data/app/models/lesli/user/detail.rb +55 -0
- data/{lib/sass/lesli/pages/otps.scss → app/models/lesli/user/role.rb} +13 -9
- data/app/models/lesli/user.rb +4 -3
- data/app/services/lesli/role_service.rb +45 -0
- data/app/services/lesli/user_service.rb +69 -0
- data/app/views/devise/passwords/new.html.erb +72 -12
- data/app/views/devise/registrations/new.html.erb +146 -28
- data/app/views/devise/sessions/new.html.erb +11 -78
- data/app/views/devise/shared/_links.html.erb +96 -25
- data/app/views/lesli/emails/devise_mailer/confirmation_instructions.html.erb +23 -0
- data/app/views/lesli/emails/user_mailer/invitation.html.erb +23 -0
- data/app/views/lesli/layouts/application-devise.html.erb +1 -1
- data/app/views/lesli/layouts/application-public.html.erb +2 -2
- data/app/views/lesli/layouts/mailer.html.erb +13 -0
- data/app/views/lesli/layouts/mailer.text.erb +1 -0
- data/app/views/lesli/partials/_application-lesli-header.html.erb +27 -41
- data/app/views/lesli/partials/_application-lesli-javascript.html.erb +10 -6
- data/app/views/lesli/partials/_application-public-javascript.html.erb +12 -8
- data/{lib/sass/lesli/devise/confirmations.scss.erb → app/views/lesli/wrappers/_application-devise-simple.erb} +30 -46
- data/app/views/lesli/wrappers/{_application-auth.html.erb → _application-devise.html.erb} +15 -0
- data/config/initializers/{lesli_defaults.rb → lesli.rb} +4 -2
- data/config/locales/translations.en.yml +7 -0
- data/config/locales/translations.es.yml +7 -0
- data/config/routes.rb +24 -17
- data/db/migrate/v1.0/0010000210_create_lesli_roles.rb +1 -1
- data/db/{tables/0010003010_create_user_details.rb → migrate/v1.0/0010003010_create_lesli_user_details.rb} +6 -6
- data/db/{tables/0010003510_create_user_roles.rb → migrate/v1.0/0010003410_create_lesli_user_roles.rb} +4 -4
- data/db/{tables/0010005010_create_descriptors.rb → migrate/v1.0/0010005010_create_lesli_descriptors.rb} +5 -6
- data/db/{tables/0010005110_create_descriptor_privileges.rb → migrate/v1.0/0010005110_create_lesli_descriptor_privileges.rb} +8 -7
- data/db/{tables/0010005210_create_descriptor_activities.rb → migrate/v1.0/0010005210_create_lesli_descriptor_activities.rb} +6 -8
- data/db/seeds.rb +0 -2
- data/lib/lesli/engine.rb +25 -2
- data/lib/lesli/routing.rb +26 -0
- data/lib/lesli/version.rb +2 -2
- data/lib/lesli.rb +1 -0
- data/lib/{sass/lesli/pages/mfas.scss → mailer_previews/devise_mailer_preview.rb} +12 -6
- data/lib/sass/lesli/bulma/loader.scss +3 -0
- data/lib/sass/lesli/elements/header.scss +1 -1
- data/lib/sass/lesli/fonts/families.scss +3 -3
- data/lib/sass/lesli/layouts/application-container.scss +4 -0
- data/lib/sass/lesli/{devise/passwords.scss.erb → pages/devise-simple.scss} +38 -38
- data/lib/sass/lesli/{templates → pages}/devise.scss +4 -26
- data/lib/sass/lesli/settings/variables.scss +1 -1
- data/lib/sass/lesli/templates/application.scss +8 -4
- data/lib/sass/lesli/templates/dashboards.scss +8 -0
- data/lib/sass/lesli/templates/public.scss +2 -3
- data/lib/tasks/lesli/controllers.rake +33 -0
- data/lib/tasks/lesli/db.rake +88 -0
- data/lib/tasks/lesli/git.rake +74 -0
- data/lib/tasks/lesli_tasks.rake +70 -20
- data/lib/vue/devise/registrations.js +10 -15
- data/lib/vue/layouts/application-container.vue +10 -2
- data/lib/vue/layouts/application-header.vue +10 -3
- data/lib/vue/stores/account.js +113 -0
- data/lib/vue/stores/role.js +243 -0
- data/lib/vue/stores/translations.json +86 -0
- data/lib/vue/stores/user.js +102 -0
- data/lib/{sass/lesli/devise/sessions.scss → vue/translation.js} +14 -5
- data/lib/webpack/base.js +2 -2
- data/lib/webpack/core.js +2 -0
- data/readme.md +74 -55
- data/vendor/bulma/LICENSE +21 -0
- data/vendor/bulma/bulma.sass +10 -0
- data/vendor/bulma/css/bulma-rtl.css +11851 -0
- data/vendor/bulma/css/bulma-rtl.min.css +1 -0
- data/vendor/bulma/css/bulma.css +11851 -0
- data/vendor/bulma/css/bulma.min.css +1 -0
- data/vendor/bulma/sass/base/_all.sass +6 -0
- data/vendor/bulma/sass/base/animations.sass +5 -0
- data/vendor/bulma/sass/base/generic.sass +145 -0
- data/vendor/bulma/sass/base/helpers.sass +1 -0
- data/vendor/bulma/sass/base/minireset.sass +79 -0
- data/vendor/bulma/sass/components/_all.sass +15 -0
- data/vendor/bulma/sass/components/breadcrumb.sass +77 -0
- data/vendor/bulma/sass/components/card.sass +103 -0
- data/vendor/bulma/sass/components/dropdown.sass +83 -0
- data/vendor/bulma/sass/components/level.sass +79 -0
- data/vendor/bulma/sass/components/media.sass +59 -0
- data/vendor/bulma/sass/components/menu.sass +59 -0
- data/vendor/bulma/sass/components/message.sass +101 -0
- data/vendor/bulma/sass/components/modal.sass +117 -0
- data/vendor/bulma/sass/components/navbar.sass +446 -0
- data/vendor/bulma/sass/components/pagination.sass +167 -0
- data/vendor/bulma/sass/components/panel.sass +121 -0
- data/vendor/bulma/sass/components/tabs.sass +176 -0
- data/vendor/bulma/sass/elements/_all.sass +16 -0
- data/vendor/bulma/sass/elements/box.sass +26 -0
- data/vendor/bulma/sass/elements/button.sass +357 -0
- data/vendor/bulma/sass/elements/container.sass +29 -0
- data/vendor/bulma/sass/elements/content.sass +162 -0
- data/vendor/bulma/sass/elements/form.sass +1 -0
- data/vendor/bulma/sass/elements/icon.sass +46 -0
- data/vendor/bulma/sass/elements/image.sass +73 -0
- data/vendor/bulma/sass/elements/notification.sass +52 -0
- data/vendor/bulma/sass/elements/other.sass +31 -0
- data/vendor/bulma/sass/elements/progress.sass +73 -0
- data/vendor/bulma/sass/elements/table.sass +134 -0
- data/vendor/bulma/sass/elements/tag.sass +140 -0
- data/vendor/bulma/sass/elements/title.sass +70 -0
- data/vendor/bulma/sass/form/_all.sass +9 -0
- data/vendor/bulma/sass/form/checkbox-radio.sass +22 -0
- data/vendor/bulma/sass/form/file.sass +184 -0
- data/vendor/bulma/sass/form/input-textarea.sass +66 -0
- data/vendor/bulma/sass/form/select.sass +88 -0
- data/vendor/bulma/sass/form/shared.sass +60 -0
- data/vendor/bulma/sass/form/tools.sass +215 -0
- data/vendor/bulma/sass/grid/_all.sass +5 -0
- data/vendor/bulma/sass/grid/columns.sass +513 -0
- data/vendor/bulma/sass/grid/tiles.sass +36 -0
- data/vendor/bulma/sass/helpers/_all.sass +12 -0
- data/vendor/bulma/sass/helpers/color.sass +39 -0
- data/vendor/bulma/sass/helpers/flexbox.sass +35 -0
- data/vendor/bulma/sass/helpers/float.sass +10 -0
- data/vendor/bulma/sass/helpers/other.sass +14 -0
- data/vendor/bulma/sass/helpers/overflow.sass +2 -0
- data/vendor/bulma/sass/helpers/position.sass +7 -0
- data/vendor/bulma/sass/helpers/spacing.sass +31 -0
- data/vendor/bulma/sass/helpers/typography.sass +103 -0
- data/vendor/bulma/sass/helpers/visibility.sass +122 -0
- data/vendor/bulma/sass/layout/_all.sass +6 -0
- data/vendor/bulma/sass/layout/footer.sass +11 -0
- data/vendor/bulma/sass/layout/hero.sass +153 -0
- data/vendor/bulma/sass/layout/section.sass +17 -0
- data/vendor/bulma/sass/utilities/_all.sass +9 -0
- data/vendor/bulma/sass/utilities/animations.sass +1 -0
- data/vendor/bulma/sass/utilities/controls.sass +49 -0
- data/vendor/bulma/sass/utilities/derived-variables.sass +114 -0
- data/vendor/bulma/sass/utilities/extends.sass +25 -0
- data/vendor/bulma/sass/utilities/functions.sass +135 -0
- data/vendor/bulma/sass/utilities/initial-variables.sass +79 -0
- data/vendor/bulma/sass/utilities/mixins.sass +303 -0
- data/vendor/lesli-css/_index.scss +34 -0
- data/vendor/lesli-css/lesli.scss +51 -0
- data/{app/assets/stylesheets/lesli/users/devise.scss → vendor/lesli-css/license} +7 -11
- data/vendor/lesli-css/src/base/fonts.scss +50 -0
- data/vendor/lesli-css/src/base/normalize.scss +118 -0
- data/vendor/lesli-css/src/components/blockquote.scss +61 -0
- data/vendor/lesli-css/src/components/columns.scss +92 -0
- data/vendor/lesli-css/src/components/container.scss +47 -0
- data/vendor/lesli-css/src/components/grid.scss +0 -0
- data/vendor/lesli-css/src/components/navigation.scss +59 -0
- data/vendor/lesli-css/src/functions/colors.scss +184 -0
- data/vendor/lesli-css/src/helpers/units.scss +44 -0
- data/vendor/lesli-css/src/mixins/breakpoint.scss +184 -0
- data/vendor/lesli-css/src/mixins/flex.scss +80 -0
- data/vendor/lesli-css/src/mixins/scrollbar.scss +46 -0
- data/vendor/lesli-css/src/settings/variables.scss +26 -0
- data/vendor/lesli-css/tests/base/normalize.spec.scss +125 -0
- data/vendor/lesli-css/tests/functions/colors.spec.scss +117 -0
- data/vendor/lesli-css/tests/mixins/breakpoint.spec.scss +429 -0
- data/vendor/lesli-css/tests/mixins/scrollbar.spec.scss +82 -0
- data/vendor/lesli-css/vendor/normalize.scss +351 -0
- data/vendor/remixicon/License +201 -0
- data/vendor/remixicon/fonts/remixicon.css +2583 -0
- metadata +290 -51
- data/app/assets/fonts/lesli/Domine/Domine-Bold.ttf +0 -0
- data/app/assets/fonts/lesli/Domine/Domine-Regular.ttf +0 -0
- data/app/controllers/lesli/profiles_controller.rb +0 -60
- data/app/helpers/lesli/profiles_helper.rb +0 -4
- data/app/models/lesli/profile.rb +0 -4
- data/app/views/lesli/devise/sessions/_form.html.erb +0 -17
- data/app/views/lesli/devise/sessions/_session.html.erb +0 -2
- data/app/views/lesli/devise/sessions/edit.html.erb +0 -10
- data/app/views/lesli/devise/sessions/index.html.erb +0 -14
- data/app/views/lesli/devise/sessions/new.html.erb +0 -9
- data/app/views/lesli/devise/sessions/show.html.erb +0 -10
- data/app/views/lesli/profiles/_form.html.erb +0 -17
- data/app/views/lesli/profiles/_profile.html.erb +0 -2
- data/app/views/lesli/profiles/edit.html.erb +0 -10
- data/app/views/lesli/profiles/index.html.erb +0 -14
- data/app/views/lesli/profiles/new.html.erb +0 -9
- data/app/views/lesli/profiles/show.html.erb +0 -10
- data/lib/sass/lesli/pages/dashboards.scss +0 -57
- data/lib/tasks/db.rb +0 -76
- data/lib/vue/stores/profile.js +0 -90
- data/lib/vue/stores/workflow2.js +0 -345
- data/lib/vue/stores/workflows/actions.js +0 -327
- data/lib/vue/stores/workflows/associations.js +0 -130
- data/lib/vue/stores/workflows/checks.js +0 -210
- /data/lib/vue/stores/{announcements.js → entities/announcements.js} +0 -0
- /data/lib/vue/stores/{dashboard.js → entities/dashboard.js} +0 -0
- /data/lib/vue/stores/{workflow.js → entities/workflow.js} +0 -0
- /data/lib/vue/stores/{cloud-bell → panels}/notification.js +0 -0
- /data/lib/vue/stores/{firebase.js → services/firebase.js} +0 -0
@@ -17,18 +17,17 @@ GNU General Public License for more details.
|
|
17
17
|
You should have received a copy of the GNU General Public License
|
18
18
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
19
19
|
|
20
|
-
Lesli ·
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
21
21
|
|
22
22
|
Made with ♥ by https://www.lesli.tech
|
23
23
|
Building a better future, one line of code at a time.
|
24
24
|
|
25
25
|
@contact hello@lesli.tech
|
26
|
-
@website https://lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
27
|
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
28
|
|
29
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
-
// ·
|
31
|
-
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
32
31
|
*/
|
33
32
|
|
34
|
-
@import "pages/
|
33
|
+
@import "lesli/pages/devise-simple";
|
@@ -17,18 +17,17 @@ GNU General Public License for more details.
|
|
17
17
|
You should have received a copy of the GNU General Public License
|
18
18
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
19
19
|
|
20
|
-
Lesli ·
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
21
21
|
|
22
22
|
Made with ♥ by https://www.lesli.tech
|
23
23
|
Building a better future, one line of code at a time.
|
24
24
|
|
25
25
|
@contact hello@lesli.tech
|
26
|
-
@website https://lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
27
|
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
28
|
|
29
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
-
// ·
|
31
|
-
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
32
31
|
*/
|
33
32
|
|
34
|
-
@import "pages/
|
33
|
+
@import "lesli/pages/devise";
|
@@ -17,22 +17,17 @@ GNU General Public License for more details.
|
|
17
17
|
You should have received a copy of the GNU General Public License
|
18
18
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
19
19
|
|
20
|
-
Lesli ·
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
21
21
|
|
22
22
|
Made with ♥ by https://www.lesli.tech
|
23
23
|
Building a better future, one line of code at a time.
|
24
24
|
|
25
25
|
@contact hello@lesli.tech
|
26
|
-
@website https://lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
27
|
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
28
|
|
29
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
-
// ·
|
31
|
-
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
32
31
|
*/
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
// · First look for custom stylesheet from builder engine,
|
37
|
-
// · if not found use the auth template from lesli pages
|
38
|
-
@import "lesli/devise/sessions";
|
33
|
+
@import "lesli/pages/devise";
|
@@ -0,0 +1,66 @@
|
|
1
|
+
=begin
|
2
|
+
|
3
|
+
Lesli
|
4
|
+
|
5
|
+
Copyright (c) 2023, 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 https://www.lesli.tech
|
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
|
+
module Lesli
|
34
|
+
class AboutsController < ApplicationLesliController
|
35
|
+
|
36
|
+
# GET /status
|
37
|
+
def show
|
38
|
+
# instance name from builder
|
39
|
+
instance = Lesli.config.instance
|
40
|
+
|
41
|
+
# get installed engines
|
42
|
+
@lesli_engines = Lesli::System.engines.map { |engine, engine_info|
|
43
|
+
{
|
44
|
+
:name => engine_info[:name],
|
45
|
+
:code => engine_info[:code],
|
46
|
+
:path => engine_info[:path],
|
47
|
+
:version => engine_info[:version],
|
48
|
+
:build => engine_info[:build]
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
respond_to do |format|
|
53
|
+
format.html {}
|
54
|
+
format.json {
|
55
|
+
if Rails.env.production?
|
56
|
+
respond_with_successful({ :Lesli => "Ruby on Rails SaaS Development Framework."})
|
57
|
+
end
|
58
|
+
|
59
|
+
if !Rails.env.production?
|
60
|
+
respond_with_successful(@lesli_engines)
|
61
|
+
end
|
62
|
+
}
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -140,17 +140,17 @@ module Lesli
|
|
140
140
|
# Track specific account activity
|
141
141
|
# this is disabled by default in the settings file
|
142
142
|
def log_account_activity(system_module, system_process, title = nil, payload = nil, description = nil)
|
143
|
-
return unless Rails.application.config.lesli.dig(:security, :enable_analytics)
|
143
|
+
# return unless Rails.application.config.lesli.dig(:security, :enable_analytics)
|
144
144
|
|
145
|
-
account = Account.first
|
145
|
+
# account = Account.first
|
146
146
|
|
147
|
-
account.activities.create({
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
147
|
+
# account.activities.create({
|
148
|
+
# system_module:,
|
149
|
+
# system_process:,
|
150
|
+
# description:,
|
151
|
+
# payload:,
|
152
|
+
# title:
|
153
|
+
# })
|
154
154
|
end
|
155
155
|
end
|
156
156
|
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
=begin
|
2
|
+
|
3
|
+
Lesli
|
4
|
+
|
5
|
+
Copyright (c) 2023, 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 https://www.lesli.tech
|
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
|
+
module Lesli
|
34
|
+
class RolesController < ApplicationLesliController
|
35
|
+
before_action :set_role, only: [:show, :update, :destroy]
|
36
|
+
|
37
|
+
def list
|
38
|
+
respond_to do |format|
|
39
|
+
format.json { respond_with_successful(RoleService.new(current_user, query).list(params)) }
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/{lib/sass/lesli/devise/registrations.scss.erb → app/controllers/lesli/users_controller.rb}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
=begin
|
2
2
|
|
3
3
|
Lesli
|
4
4
|
|
@@ -17,7 +17,7 @@ GNU General Public License for more details.
|
|
17
17
|
You should have received a copy of the GNU General Public License
|
18
18
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
19
19
|
|
20
|
-
Lesli · Ruby on Rails SaaS
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
21
21
|
|
22
22
|
Made with ♥ by https://www.lesli.tech
|
23
23
|
Building a better future, one line of code at a time.
|
@@ -27,24 +27,19 @@ Building a better future, one line of code at a time.
|
|
27
27
|
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
28
|
|
29
29
|
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
-
// ·
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
font-weight: 700;
|
47
|
-
}
|
48
|
-
}
|
49
|
-
}
|
50
|
-
}
|
30
|
+
// ·
|
31
|
+
=end
|
32
|
+
|
33
|
+
module Lesli
|
34
|
+
class UsersController < ApplicationLesliController
|
35
|
+
|
36
|
+
# GET /users/list
|
37
|
+
def list
|
38
|
+
respond_to do |format|
|
39
|
+
format.json {
|
40
|
+
respond_with_successful(UserService.new(current_user, query).list(params))
|
41
|
+
}
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -1,62 +1,141 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
=begin
|
4
|
+
|
5
|
+
Lesli
|
6
|
+
|
7
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
8
|
+
|
9
|
+
This program is free software: you can redistribute it and/or modify
|
10
|
+
it under the terms of the GNU General Public License as published by
|
11
|
+
the Free Software Foundation, either version 3 of the License, or
|
12
|
+
(at your option) any later version.
|
13
|
+
|
14
|
+
This program is distributed in the hope that it will be useful,
|
15
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
+
GNU General Public License for more details.
|
18
|
+
|
19
|
+
You should have received a copy of the GNU General Public License
|
20
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
21
|
+
|
22
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
23
|
+
|
24
|
+
Made with ♥ by https://www.lesli.tech
|
25
|
+
Building a better future, one line of code at a time.
|
26
|
+
|
27
|
+
@contact hello@lesli.tech
|
28
|
+
@website https://www.lesli.tech
|
29
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
30
|
+
|
31
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
32
|
+
// ·
|
33
|
+
=end
|
34
|
+
|
3
35
|
class Users::RegistrationsController < Devise::RegistrationsController
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
36
|
+
before_action :configure_sign_up_params, only: [:create]
|
37
|
+
# before_action :configure_account_update_params, only: [:update]
|
38
|
+
|
39
|
+
# GET /resource/sign_up
|
40
|
+
# def new
|
41
|
+
# super
|
42
|
+
# end
|
43
|
+
|
44
|
+
def create
|
45
|
+
|
46
|
+
# # Check if instance allow multi-account
|
47
|
+
# if !Rails.application.config.lesli.dig(:security, :allow_registration)
|
48
|
+
# respond_with_error(I18n.t("core.users/registrations.messages_error_registration_not_allowed"))
|
49
|
+
# return
|
50
|
+
# end
|
51
|
+
|
52
|
+
# # Validate user is unique
|
53
|
+
# if ::User.with_deleted.find_by(email: sign_up_params["email"])
|
54
|
+
# return respond_with_error(I18n.t("core.users/registrations.messages_info_user_already_exists"))
|
55
|
+
# end
|
56
|
+
|
57
|
+
# build new user
|
58
|
+
user = build_resource(sign_up_params)
|
59
|
+
|
60
|
+
# run password complexity validations
|
61
|
+
#user_validator = UsersValidator.new(user).password_complexity(sign_up_params[:password])
|
62
|
+
|
63
|
+
# return if there are errors with the complexity validations
|
64
|
+
# unless user_validator.valid?
|
65
|
+
# return respond_with_error("password_complexity_error", password_complexity.failures)
|
66
|
+
# end
|
67
|
+
|
68
|
+
# persist new user
|
69
|
+
if user.save
|
70
|
+
respond_with_successful()
|
71
|
+
else
|
72
|
+
respond_with_error(user.errors.full_messages.to_sentence)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# GET /resource/edit
|
77
|
+
# def edit
|
78
|
+
# super
|
79
|
+
# end
|
80
|
+
|
81
|
+
# PUT /resource
|
82
|
+
# def update
|
83
|
+
# super
|
84
|
+
# end
|
85
|
+
|
86
|
+
# DELETE /resource
|
87
|
+
# def destroy
|
88
|
+
# super
|
89
|
+
# end
|
90
|
+
|
91
|
+
# GET /resource/cancel
|
92
|
+
# Forces the session data which is usually expired after sign
|
93
|
+
# in to be expired now. This is useful if the user wants to
|
94
|
+
# cancel oauth signing in/up in the middle of the process,
|
95
|
+
# removing all OAuth session data.
|
96
|
+
# def cancel
|
97
|
+
# super
|
98
|
+
# end
|
99
|
+
|
100
|
+
protected
|
101
|
+
|
102
|
+
# If you have extra params to permit, append them to the sanitizer.
|
103
|
+
# def configure_account_update_params
|
104
|
+
# devise_parameter_sanitizer.permit(:account_update, keys: [:attribute])
|
105
|
+
# end
|
106
|
+
|
107
|
+
# If you have extra params to permit, append them to the sanitizer.
|
108
|
+
def configure_sign_up_params
|
109
|
+
devise_parameter_sanitizer.permit(:sign_up, keys: [
|
110
|
+
:email,
|
111
|
+
:password,
|
112
|
+
:password_confirmation
|
113
|
+
])
|
114
|
+
end
|
115
|
+
|
116
|
+
# The path used after sign up.
|
117
|
+
# def after_sign_up_path_for(resource)
|
118
|
+
# super(resource)
|
119
|
+
# end
|
120
|
+
|
121
|
+
# The path used after sign up for inactive accounts.
|
122
|
+
# def after_inactive_sign_up_path_for(resource)
|
123
|
+
# super(resource)
|
124
|
+
# end
|
125
|
+
|
126
|
+
# def sign_up_params
|
127
|
+
# params.permit(:sign_up, keys: [
|
128
|
+
# :email,
|
129
|
+
# :password,
|
130
|
+
# :password_confirmation
|
131
|
+
# ])
|
132
|
+
# end
|
133
|
+
|
134
|
+
def sign_up_params
|
135
|
+
params.permit(:sign_up,
|
136
|
+
:email,
|
137
|
+
:password,
|
138
|
+
:password_confirmation
|
139
|
+
)
|
140
|
+
end
|
62
141
|
end
|
@@ -23,11 +23,11 @@ Made with ♥ by https://www.lesli.tech
|
|
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.
|
26
|
+
@website https://www.lesli.tech
|
27
27
|
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
28
|
|
29
29
|
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
-
// ·
|
30
|
+
// ·
|
31
31
|
=end
|
32
32
|
|
33
33
|
module Lesli
|
@@ -46,7 +46,7 @@ module Lesli
|
|
46
46
|
|
47
47
|
# return the name of the language
|
48
48
|
def language_name(locale)
|
49
|
-
|
49
|
+
Lesli.config.locales.dig(locale) || "undefined"
|
50
50
|
end
|
51
51
|
|
52
52
|
# print a custom icon for lesli
|
@@ -17,18 +17,17 @@ GNU General Public License for more details.
|
|
17
17
|
You should have received a copy of the GNU General Public License
|
18
18
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
19
19
|
|
20
|
-
Lesli ·
|
20
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
21
21
|
|
22
22
|
Made with ♥ by https://www.lesli.tech
|
23
23
|
Building a better future, one line of code at a time.
|
24
24
|
|
25
25
|
@contact hello@lesli.tech
|
26
|
-
@website https://lesli.tech
|
26
|
+
@website https://www.lesli.tech
|
27
27
|
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
28
|
|
29
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
-
// ·
|
31
|
-
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
32
31
|
=end
|
33
32
|
|
34
33
|
module Lesli
|
@@ -118,11 +117,9 @@ module Lesli
|
|
118
117
|
# PRODUCTIVITY & TEAMWORK
|
119
118
|
|
120
119
|
# 03.01 Driver engine
|
121
|
-
def navigation_engine_driver(title: "Driver", subtitle: "
|
122
|
-
return unless defined?
|
123
|
-
|
124
|
-
navigation_engine_item(title, subtitle, "driver", cloud_driver.root_path,
|
125
|
-
controller_path.include?("cloud_driver"))
|
120
|
+
def navigation_engine_driver(title: "Driver", subtitle: "Unified calendar app")
|
121
|
+
return unless defined? LesliDriver
|
122
|
+
navigation_engine_item(title, subtitle, "driver", lesli_driver.root_path, controller_path.include?("lesli_driver"))
|
126
123
|
end
|
127
124
|
|
128
125
|
# 03.02 Work engine
|
@@ -46,7 +46,7 @@ module Lesli
|
|
46
46
|
|
47
47
|
# return the information about the current engine
|
48
48
|
def lesli_engine(property = nil)
|
49
|
-
Lesli::System.engine(lesli_controller
|
49
|
+
Lesli::System.engine(lesli_controller, property)
|
50
50
|
end
|
51
51
|
|
52
52
|
# return true if the controller requested belongs to the administration area
|
data/app/lib/lesli/system.rb
CHANGED
@@ -28,7 +28,6 @@ Building a better future, one line of code at a time.
|
|
28
28
|
|
29
29
|
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
30
|
// ·
|
31
|
-
|
32
31
|
=end
|
33
32
|
|
34
33
|
module Lesli
|
@@ -39,6 +38,8 @@ module Lesli
|
|
39
38
|
# engine("LesliAdmin", "name")
|
40
39
|
def self.engine(engine, property=nil)
|
41
40
|
|
41
|
+
engine = engine.camelize
|
42
|
+
|
42
43
|
engines() if ENGINES.empty?
|
43
44
|
|
44
45
|
# return specific property if requested
|
@@ -57,10 +58,13 @@ module Lesli
|
|
57
58
|
# we use this in the url plugin
|
58
59
|
LESLI_ENGINES.each do |engine|
|
59
60
|
next unless Object.const_defined?(engine)
|
61
|
+
engine_instance = "#{engine}".constantize
|
60
62
|
ENGINES[engine]= {
|
61
63
|
:code => engine.underscore,
|
62
64
|
:name => lesli_engine_name(engine),
|
63
|
-
:path =>
|
65
|
+
:path => engine_instance::Engine.routes.find_script_name({}),
|
66
|
+
:version => engine_instance::VERSION,
|
67
|
+
:build => engine_instance::BUILD,
|
64
68
|
:dir => Gem::Specification.find_by_name(engine.underscore).gem_dir
|
65
69
|
}
|
66
70
|
end
|
@@ -77,6 +81,6 @@ module Lesli
|
|
77
81
|
name.sub("Lesli", "")
|
78
82
|
end
|
79
83
|
|
80
|
-
LESLI_ENGINES = ["Lesli", "LesliAdmin", "LesliBabel", "LesliAudit", "LesliBell"]
|
84
|
+
LESLI_ENGINES = ["Lesli", "LesliAdmin", "LesliBabel", "LesliAudit", "LesliBell", "LesliDriver"]
|
81
85
|
end
|
82
86
|
end
|