lesli 5.0.1 → 5.0.2
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/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/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 +22 -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
- metadata +196 -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/assets/stylesheets/lesli/users/devise.scss +0 -32
- 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";
|
|
@@ -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
|