lesli 5.0.10 → 5.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/lesli_manifest.js +0 -13
  3. data/app/assets/icons/lesli/engine-security.svg +1 -0
  4. data/app/assets/icons/lesli/engine-shield.svg +1 -0
  5. data/app/assets/images/lesli/lesli-logo.svg +4 -0
  6. data/app/assets/stylesheets/lesli/templates/application.css +21862 -209
  7. data/app/assets/stylesheets/lesli/templates/public.css +19098 -1
  8. data/app/assets/stylesheets/lesli/users/confirmations.css +19219 -0
  9. data/app/assets/stylesheets/lesli/users/passwords.css +19202 -0
  10. data/app/assets/stylesheets/lesli/users/registrations.css +19594 -0
  11. data/app/assets/stylesheets/lesli/users/sessions.css +19594 -1
  12. data/app/controllers/lesli/abouts_controller.rb +12 -18
  13. data/app/controllers/lesli/application_controller.rb +25 -25
  14. data/app/controllers/lesli/application_lesli_controller.rb +5 -6
  15. data/app/controllers/lesli/interfaces/application/authorization.rb +1 -1
  16. data/app/controllers/lesli/interfaces/application/customization.rb +1 -1
  17. data/app/controllers/lesli/interfaces/application/requester.rb +2 -2
  18. data/app/controllers/lesli/interfaces/application/responder.rb +8 -8
  19. data/app/controllers/lesli/interfaces/controllers/actions.rb +250 -0
  20. data/app/controllers/lesli/interfaces/controllers/activities.rb +215 -0
  21. data/app/controllers/lesli/interfaces/controllers/discussions.rb +270 -0
  22. data/app/controllers/lesli/interfaces/controllers/files.rb +467 -0
  23. data/app/controllers/lesli/interfaces/controllers/subscribers.rb +234 -0
  24. data/app/helpers/lesli/assets_helper.rb +4 -4
  25. data/app/helpers/lesli/navigation_helper.rb +38 -81
  26. data/app/lib/lesli/system.rb +4 -3
  27. data/app/models/concerns/account_initializer.rb +46 -42
  28. data/{lib/scss/devise/registrations.scss → app/models/lesli/account/detail.rb} +7 -3
  29. data/app/models/lesli/account.rb +12 -5
  30. data/app/models/lesli/cloud_object/action.rb +70 -0
  31. data/app/models/lesli/cloud_object/activity.rb +311 -0
  32. data/app/models/lesli/cloud_object/custom_field.rb +158 -0
  33. data/app/models/lesli/cloud_object/discussion.rb +219 -0
  34. data/app/models/lesli/cloud_object/subscriber.rb +186 -0
  35. data/app/models/lesli/shared/dashboard.rb +16 -5
  36. data/app/models/lesli/user/session.rb +0 -2
  37. data/app/models/lesli/user.rb +13 -13
  38. data/app/operators/lesli/user_registration_operator.rb +3 -3
  39. data/app/views/lesli/layouts/application-devise.html.erb +6 -6
  40. data/app/views/lesli/layouts/application-lesli.html.erb +1 -1
  41. data/app/views/lesli/partials/_application-data.html.erb +2 -1
  42. data/app/views/lesli/partials/_application-lesli-engines.html.erb +14 -39
  43. data/app/views/lesli/partials/_application-lesli-header.html.erb +4 -4
  44. data/app/views/lesli/partials/_application-lesli-icons.html.erb +1 -1
  45. data/app/views/lesli/partials/_application-lesli-panels.html.erb +7 -7
  46. data/app/views/lesli/wrappers/_application-devise.html.erb +5 -7
  47. data/config/initializers/devise.rb +335 -335
  48. data/config/initializers/lesli.rb +8 -2
  49. data/config/locales/translations.en.yml +4 -0
  50. data/config/locales/translations.es.yml +4 -0
  51. data/config/locales/translations.fr.yml +28 -0
  52. data/config/locales/translations.it.yml +28 -0
  53. data/config/locales/translations.pt.yml +28 -0
  54. data/config/routes.rb +1 -10
  55. data/db/migrate/{v1.0/0010003010_create_lesli_user_details.rb → v1/0010000110_create_lesli_accounts.rb} +19 -13
  56. data/db/migrate/{v1.0/0010000110_create_lesli_accounts.rb → v1/0010001010_create_lesli_account_details.rb} +5 -7
  57. data/db/migrate/{v1.0/0010001010_create_lesli_account_settings.rb → v1/0010001110_create_lesli_account_settings.rb} +2 -2
  58. data/db/seed/development/accounts.rb +10 -7
  59. data/db/seed/development/users.rb +20 -20
  60. data/db/seed/production/accounts.rb +10 -7
  61. data/db/seed/production/users.rb +7 -0
  62. data/db/seed/tools.rb +0 -1
  63. data/lib/lesli/engine.rb +2 -12
  64. data/lib/lesli/version.rb +2 -2
  65. data/lib/lesli.rb +0 -1
  66. data/lib/scss/cloud-objects/discussion.scss +8 -5
  67. data/lib/scss/layouts/application-header.scss +3 -1
  68. data/lib/scss/layouts/application-navbar.scss +2 -1
  69. data/lib/scss/{elements/msg.scss → overrides/notification.scss} +16 -18
  70. data/lib/scss/pages/devise-simple.scss +4 -2
  71. data/lib/scss/pages/devise.scss +111 -99
  72. data/lib/scss/panels/panel-notification.scss +1 -1
  73. data/lib/scss/panels/{panel-ticket.scss → panel-support-ticket.scss} +3 -4
  74. data/lib/scss/templates/application.scss +7 -5
  75. data/lib/tasks/lesli/controllers.rake +1 -1
  76. data/lib/tasks/lesli/db.rake +33 -31
  77. data/lib/tasks/lesli_tasks.rake +6 -6
  78. data/lib/vue/application.js +13 -12
  79. data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/content.vue +10 -8
  80. data/lib/vue/cloudobjects/discussion/element.vue +170 -0
  81. data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/filters.vue +1 -1
  82. data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/new.vue +20 -16
  83. data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion.vue +25 -24
  84. data/lib/vue/{refactor/stores/cloudobjects → cloudobjects/stores}/discussion.js +7 -16
  85. data/lib/vue/layouts/application-header.vue +5 -5
  86. data/lib/vue/panels/{panel-notifications.vue → panel-bell-notifications.vue} +15 -19
  87. data/lib/vue/panels/panel-support-tickets.vue +161 -0
  88. data/lib/vue/panels/stores/bell-notifications.js +46 -0
  89. data/lib/vue/panels/stores/support-tickets.js +103 -0
  90. data/lib/vue/shared/dashboards/apps/edit.vue +10 -10
  91. data/lib/vue/shared/dashboards/components/form.vue +31 -40
  92. data/lib/vue/shared/stores/dashboard.js +2 -0
  93. data/lib/vue/shared/stores/layout.js +2 -1
  94. data/lib/{scss/devise/confirmations.scss → vue/shared/stores/users.js} +22 -21
  95. data/lib/vue/stores/translations.json +109 -2
  96. data/lib/webpack/base.js +9 -8
  97. data/lib/webpack/core.js +8 -6
  98. data/readme.md +16 -15
  99. metadata +49 -75
  100. data/app/assets/icons/lesli/engine-guard.svg +0 -1
  101. data/app/assets/javascripts/lesli/users/sessions.js +0 -1
  102. data/app/controllers/users/confirmations_controller.rb +0 -66
  103. data/app/controllers/users/omniauth_callbacks_controller.rb +0 -30
  104. data/app/controllers/users/passwords_controller.rb +0 -71
  105. data/app/controllers/users/registrations_controller.rb +0 -141
  106. data/app/controllers/users/sessions_controller.rb +0 -141
  107. data/app/controllers/users/unlocks_controller.rb +0 -30
  108. data/app/views/devise/confirmations/new.html.erb +0 -2
  109. data/app/views/devise/confirmations/show.html.erb +0 -63
  110. data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
  111. data/app/views/devise/mailer/email_changed.html.erb +0 -7
  112. data/app/views/devise/mailer/password_change.html.erb +0 -3
  113. data/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
  114. data/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
  115. data/app/views/devise/passwords/edit.html.erb +0 -79
  116. data/app/views/devise/passwords/new.html.erb +0 -75
  117. data/app/views/devise/registrations/edit.html.erb +0 -43
  118. data/app/views/devise/registrations/new.html.erb +0 -147
  119. data/app/views/devise/sessions/new.html.erb +0 -111
  120. data/app/views/devise/shared/_error_messages.html.erb +0 -15
  121. data/app/views/devise/shared/_links.html.erb +0 -96
  122. data/app/views/devise/unlocks/new.html.erb +0 -16
  123. data/db/migrate/v1.0/0010000210_create_lesli_roles.rb +0 -59
  124. data/db/migrate/v1.0/0010000310_create_lesli_users.rb +0 -97
  125. data/db/migrate/v1.0/0010003110_create_lesli_user_settings.rb +0 -44
  126. data/db/migrate/v1.0/0010003210_create_lesli_user_sessions.rb +0 -55
  127. data/db/migrate/v1.0/0010003410_create_lesli_user_powers.rb +0 -43
  128. data/db/migrate/v1.0/0010004010_create_lesli_user_logs.rb +0 -45
  129. data/db/migrate/v1.0/0010005010_create_lesli_descriptors.rb +0 -44
  130. data/db/migrate/v1.0/0010005110_create_lesli_descriptor_privileges.rb +0 -45
  131. data/db/migrate/v1.0/0010005210_create_lesli_descriptor_activities.rb +0 -49
  132. data/db/migrate/v1.0/0010005510_create_lesli_role_powers.rb +0 -51
  133. data/db/migrate/v1.0/0010005710_create_lesli_role_privileges.rb +0 -45
  134. data/lib/lesli/routing.rb +0 -26
  135. data/lib/scss/components/editor-richtext.scss +0 -88
  136. data/lib/scss/devise/oauth.scss +0 -34
  137. data/lib/scss/devise/passwords.scss +0 -33
  138. data/lib/scss/devise/sessions.scss +0 -35
  139. data/lib/scss/elements/avatar.scss +0 -48
  140. data/lib/scss/elements/calendar.scss +0 -47
  141. data/lib/scss/elements/toggle.scss +0 -102
  142. data/lib/vue/devise/confirmations.js +0 -33
  143. data/lib/vue/devise/passwords.js +0 -137
  144. data/lib/vue/devise/registrations.js +0 -157
  145. data/lib/vue/devise/sessions.js +0 -148
  146. data/lib/vue/panels/panel-tickets.vue +0 -181
  147. data/lib/vue/refactor/shared/cloudobjects/discussion/element.vue +0 -132
  148. data/lib/vue/shared/stores/account.js +0 -113
  149. /data/app/assets/icons/lesli/{engine-driver.svg → engine-calendar.svg} +0 -0
  150. /data/db/migrate/{v1.0 → v1}/0010000610_create_lesli_system_controllers.rb +0 -0
  151. /data/db/migrate/{v1.0 → v1}/0010000710_create_lesli_system_controller_actions.rb +0 -0
  152. /data/db/migrate/{v1.0 → v1}/0010001210_create_lesli_account_activities.rb +0 -0
  153. /data/db/migrate/{v1.0 → v1}/0010001410_create_lesli_account_logs.rb +0 -0
@@ -1,43 +0,0 @@
1
- <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
-
3
- <%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
4
- <%= render "devise/shared/error_messages", resource: resource %>
5
-
6
- <div class="field">
7
- <%= f.label :email %><br />
8
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
- </div>
10
-
11
- <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
12
- <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
13
- <% end %>
14
-
15
- <div class="field">
16
- <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
17
- <%= f.password_field :password, autocomplete: "new-password" %>
18
- <% if @minimum_password_length %>
19
- <br />
20
- <em><%= @minimum_password_length %> characters minimum</em>
21
- <% end %>
22
- </div>
23
-
24
- <div class="field">
25
- <%= f.label :password_confirmation %><br />
26
- <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
27
- </div>
28
-
29
- <div class="field">
30
- <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
31
- <%= f.password_field :current_password, autocomplete: "current-password" %>
32
- </div>
33
-
34
- <div class="actions">
35
- <%= f.submit "Update" %>
36
- </div>
37
- <% end %>
38
-
39
- <h3>Cancel my account</h3>
40
-
41
- <div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div>
42
-
43
- <%= link_to "Back", :back %>
@@ -1,147 +0,0 @@
1
- <%
2
- =begin
3
-
4
- Lesli
5
-
6
- Copyright (c) 2023, Lesli Technologies, S. A.
7
-
8
- This program is free software: you can redistribute it and/or modify
9
- it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation, either version 3 of the License, or
11
- (at your option) any later version.
12
-
13
- This program is distributed in the hope that it will be useful,
14
- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- GNU General Public License for more details.
17
-
18
- You should have received a copy of the GNU General Public License
19
- along with this program. If not, see http://www.gnu.org/licenses/.
20
-
21
- Lesli · Ruby on Rails SaaS Development Framework.
22
-
23
- Made with ♥ by https://www.lesli.tech
24
- Building a better future, one line of code at a time.
25
-
26
- @contact hello@lesli.tech
27
- @website https://www.lesli.tech
28
- @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
29
-
30
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
31
- // ·
32
- =end
33
- %>
34
-
35
-
36
- <%= render("lesli/wrappers/application-devise", title:"Create account to discover Lesli") do %>
37
-
38
- <%# Log in form %>
39
- <form @submit.prevent="postRegistration" method="post">
40
- <div class="field mb-4">
41
- <label for="user_email" class="label">E-mail address</label>
42
- <div class="control has-icons-left has-icons-right">
43
- <input
44
- id="user_email"
45
- name="user_email"
46
- type="email"
47
- ref="email"
48
- :class="['input', `is-${notification.type}`]"
49
- placeholder="hello@lesli.cloud"
50
- v-model="sign_up.email"
51
- @input="typing">
52
- <span
53
- class="icon is-small is-left"
54
- :class="['icon', 'is-small', 'is-left', `has-text-${notification.type}`]">
55
- <i class="ri-mail-fill"></i>
56
- </span>
57
- </div>
58
- </div>
59
- <div class="field mb-5">
60
- <label for="user_password" class="label">Password</label>
61
- <div class="control has-icons-left has-icons-right">
62
- <input
63
- id="user_password"
64
- name="user_password"
65
- type="password"
66
- ref="password"
67
- :class="['input', `is-${notification.type}`]"
68
- placeholder="* * * * * * *"
69
- v-model="sign_up.password"
70
- @input="typing">
71
- <span
72
- :class="['icon', 'is-small', 'is-left', `has-text-${notification.type}`]">
73
- <i class="ri-key-fill"></i>
74
- </span>
75
- <span
76
- @click="togglePasswordInput()"
77
- :class="['icon', 'is-small', 'is-right', `has-text-${notification.type}`]">
78
- <i class="ri-eye-fill"></i>
79
- </span>
80
- </div>
81
- <p v-cloak v-if="notification.show" :class="['help', `is-${notification.type}`]">
82
- {{ notification.message }}
83
- </p>
84
- </div>
85
- <div class="field mb-5">
86
- <p>Password needs to contain:</p>
87
- <ul class="pl-3 password-requirements">
88
- <li :class="[
89
- 'icon-text', 'is-block', {
90
- 'has-text-danger': password_uppercase == 1,
91
- 'has-text-success': password_uppercase == 2
92
- }
93
- ]">
94
- <span class="text">
95
- &bull; minimum one uppercase letter
96
- </span>
97
- <span class="icon">
98
- <i class="ri-eye-fill"></i>
99
- </span>
100
- </li>
101
- <li :class="[
102
- 'icon-text', 'is-block', {
103
- 'has-text-danger': password_symbol == 1,
104
- 'has-text-success': password_symbol == 2
105
- }
106
- ]">
107
- <span class="text">
108
- &bull; one symbol
109
- </span>
110
- <span class="icon">
111
- <i class="ri-eye-fill"></i>
112
- </span>
113
- </li>
114
- <li :class="[
115
- 'icon-text', 'is-block', {
116
- 'has-text-danger': password_number == 1,
117
- 'has-text-success': password_number == 2
118
- }
119
- ]">
120
- <span class="text">
121
- &bull; one number
122
- </span>
123
- <span class="icon">
124
- <i class="ri-eye-fill"></i>
125
- </span>
126
- </li>
127
- </ul>
128
- </div>
129
- <div class="field">
130
- <p class="terms">
131
- By creating an account, you agree to our <a><u><b>Terms</b></u></a> and have
132
- read and acknowledge the <a><u><b>Global Privacy Statement</b></u></a>
133
- </p>
134
- </div>
135
- <div class="field">
136
- <div class="control is-fullwidth">
137
- <input type="submit" class="button is-primary is-fullwidth mb-2" value="Create account">
138
- <p class="account has-text-centered">
139
- Already have an account?
140
- <%= link_to new_user_session_path, :class => "has-text-primary" do %>
141
- <u><b>Log in</b></u>
142
- <% end %>
143
- </p>
144
- </div>
145
- </div>
146
- </form>
147
- <% end %>
@@ -1,111 +0,0 @@
1
- <%
2
- =begin
3
-
4
- Lesli
5
-
6
- Copyright (c) 2023, Lesli Technologies, S. A.
7
-
8
- This program is free software: you can redistribute it and/or modify
9
- it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation, either version 3 of the License, or
11
- (at your option) any later version.
12
-
13
- This program is distributed in the hope that it will be useful,
14
- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- GNU General Public License for more details.
17
-
18
- You should have received a copy of the GNU General Public License
19
- along with this program. If not, see http://www.gnu.org/licenses/.
20
-
21
- Lesli · Ruby on Rails SaaS Development Framework.
22
-
23
- Made with ♥ by https://www.lesli.tech
24
- Building a better future, one line of code at a time.
25
-
26
- @contact hello@lesli.tech
27
- @website https://www.lesli.tech
28
- @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
29
-
30
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
31
- // ·
32
- =end
33
- %>
34
-
35
- <%= render("lesli/wrappers/application-devise", title:"Welcome to Lesli") do %>
36
-
37
- <%# Log in form %>
38
- <form @submit="postLogin" method="post">
39
- <div class="field mb-4">
40
- <label for="user_email" class="label">E-mail address</label>
41
- <div class="control has-icons-left has-icons-right">
42
- <input
43
- required
44
- id="user_email"
45
- name="user_email"
46
- type="email"
47
- ref="email"
48
- :class="['input', `is-${notification.type}`]"
49
- placeholder="hello@lesli.tech"
50
- v-model="sign_in.email"
51
- @input="typing">
52
- <span :class="['icon', 'is-small', 'is-left', `has-text-${notification.type}`]">
53
- <i class="ri-user-line"></i>
54
- </span>
55
- </div>
56
- </div>
57
- <div class="field mb-5">
58
- <label for="user_password" class="label">Password</label>
59
- <div class="control has-icons-left has-icons-right">
60
- <input
61
- required
62
- id="user_password"
63
- name="user_password"
64
- type="password"
65
- ref="password"
66
- :class="['input', `is-${notification.type}`]"
67
- placeholder="* * * * * * *"
68
- v-model="sign_in.password"
69
- @input="typing">
70
- <span :class="['icon', 'is-small', 'is-left', `has-text-${notification.type}`]">
71
- <i class="ri-key-fill"></i>
72
- </span>
73
- <span
74
- @click="togglePasswordInput()"
75
- :class="['icon', 'is-small', 'is-right', `has-text-${notification.type}`]">
76
- <i class="ri-eye-fill"></i>
77
- </span>
78
- </div>
79
- <p v-cloak v-if="notification.show" :class="['help', `is-${notification.type}`]">
80
- {{ notification.message }}
81
- </p>
82
- </div>
83
-
84
- <div class="field mb-6">
85
- <div class="control is-fullwidth">
86
- <button
87
- type="submit"
88
- :class="['button', 'is-primary', 'is-fullwidth', 'mb-2', {'is-loading':loading}]">
89
- Log in
90
- </button>
91
- <% if Lesli.config.security.dig(:allow_registration) %>
92
- <p class="account has-text-centered">
93
- Still not registered?
94
- <%= link_to(new_user_registration_path, :class => "has-text-primary") do %>
95
- <u><b>Create account</b></u>
96
- <% end %>
97
- </p>
98
- <% end %>
99
- </div>
100
- </div>
101
-
102
- <div class="field mb-6" v-if="false">
103
- <p class="message has-text-success">
104
- Registration successfully done. Please check your E-mail to activate your account.
105
- </p>
106
- </div>
107
- </form>
108
-
109
- <%= render("devise/shared/links", password_reset:true, magic_link:true, otp:true) %>
110
-
111
- <% end %>
@@ -1,15 +0,0 @@
1
- <% if resource.errors.any? %>
2
- <div id="error_explanation" data-turbo-cache="false">
3
- <h2>
4
- <%= I18n.t("errors.messages.not_saved",
5
- count: resource.errors.count,
6
- resource: resource.class.model_name.human.downcase)
7
- %>
8
- </h2>
9
- <ul>
10
- <% resource.errors.full_messages.each do |message| %>
11
- <li><%= message %></li>
12
- <% end %>
13
- </ul>
14
- </div>
15
- <% end %>
@@ -1,96 +0,0 @@
1
- <%
2
- =begin
3
-
4
- Lesli
5
-
6
- Copyright (c) 2023, Lesli Technologies, S. A.
7
-
8
- This program is free software: you can redistribute it and/or modify
9
- it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation, either version 3 of the License, or
11
- (at your option) any later version.
12
-
13
- This program is distributed in the hope that it will be useful,
14
- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- GNU General Public License for more details.
17
-
18
- You should have received a copy of the GNU General Public License
19
- along with this program. If not, see http://www.gnu.org/licenses/.
20
-
21
- Lesli · Ruby on Rails SaaS Development Framework.
22
-
23
- Made with ♥ by https://www.lesli.tech
24
- Building a better future, one line of code at a time.
25
-
26
- @contact hello@lesli.tech
27
- @website https://www.lesli.tech
28
- @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
29
-
30
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
31
- // ·
32
- =end
33
- %>
34
-
35
- <% login = defined?(login) ? login : false %>
36
- <% password_reset = defined?(password_reset) ? password_reset : false %>
37
- <% magic_link = defined?(magic_link) ? magic_link : false %>
38
- <% otp = defined?(otp) ? otp : false %>
39
-
40
- <div class="links">
41
-
42
- <% if login %>
43
- <%= link_to(new_user_session_path) do %>
44
- <span class="icon mr-1">
45
- <svg xmlns="http://www.w3.org/2000/svg" width="23" height="17" fill="none" viewBox="0 0 23.441 17.473">
46
- <path fill="#112a62" d="M6.253 2.41A6.253 6.253 0 0 0 .035 7.997a6.251 6.251 0 0 0 9.323 6.086 6.252 6.252 0 0 0 2.829-3.47h1.097v-.781h-.894a6.104 6.104 0 0 0 0-2.344h9.293l.879 1.172-.88 1.172h-.425l-1.055-1.059a.389.389 0 0 0-.554 0l-1.055 1.059h-.41l-.668-.997a.39.39 0 0 0-.649 0l-.668.997h-.57v.78h.781c.131 0 .252-.066.324-.175l.457-.684.457.684c.073.11.194.175.325.176h.78a.389.389 0 0 0 .278-.113l.895-.899.894.899a.388.388 0 0 0 .278.113h.78a.39.39 0 0 0 .313-.156l1.172-1.563a.39.39 0 0 0 0-.469L22.19 6.863a.39.39 0 0 0-.312-.156h-9.692A6.254 6.254 0 0 0 6.253 2.41Zm0 11.718c-.133 0-.261 0-.39-.02v-.76h.78v.76c-.128.02-.257.02-.39.02zM2.738 6.706h-.782v-.78h.782zm7.031-.78h.781v.78H9.77Zm-1.563 6.25h.782v.78h-.782zm-3.906.78H3.52v-.78H4.3zm6.25-1.562H9.77v-.781h.781ZM6.644 9.761v2.024h-.781V9.76a1.17 1.17 0 0 1-.711-.71H3.128v-.782h2.024a1.172 1.172 0 1 1 1.492 1.492zm-3.906 1.633h-.782v-.781h.782zm5.468-6.25v-.781h.782v.781zm-3.906 0H3.52v-.781H4.3zM1.566 8.269v.781H.804V8.27zm9.375.781V8.27h.781c0 .129.02.258.02.39 0 .133 0 .262-.02.391zM6.644 3.972h-.782v-.781h.781z"/>
47
- <path fill="#112a62" d="m.134 2.09.492.61a8.595 8.595 0 0 1 10.973.125l.508-.594a9.372 9.372 0 0 0-11.973-.14ZM.69 14.774l-.492.609a9.38 9.38 0 0 0 11.973-.14l-.508-.594a8.596 8.596 0 0 1-10.972.125zM9.767 11.786v-.781h.782v.781z"/>
48
- </svg>
49
- </span>
50
- <span>Login</span>
51
- <% end %>
52
- <% end %>
53
-
54
- <% if password_reset %>
55
- <%= link_to(new_user_password_path) do %>
56
- <span class="icon mr-2">
57
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
58
- <path d="M10 4.75C8.55296 4.75 7.375 5.92796 7.375 7.375V8.25C6.89155 8.25 6.5 8.64155 6.5 9.125V13.5C6.5 13.9834 6.89155 14.375 7.375 14.375H12.625C13.1084 14.375 13.5 13.9834 13.5 13.5V9.125C13.5 8.64155 13.1084 8.25 12.625 8.25V7.375C12.625 5.92796 11.447 4.75 10 4.75ZM11.75 12.625H8.25V10H11.75V12.625ZM9.125 8.25V7.375C9.125 6.89264 9.51764 6.5 10 6.5C10.4824 6.5 10.875 6.89264 10.875 7.375V8.25H9.125Z" fill="#112A62"/>
59
- <path d="M16.7549 3.14324C13.4431 -0.120437 8.34511 -0.489197 4.62839 2.0123L4.61745 0.577295C4.61526 0.336669 4.41839 0.141979 4.17667 0.143071L3.30167 0.149633C3.05996 0.151821 2.86527 0.348697 2.86745 0.590409L2.89151 3.86501C2.89479 4.21938 3.11026 4.53656 3.43729 4.67001C3.76542 4.80345 4.14056 4.72579 4.38993 4.47314C7.43941 1.3811 12.4343 1.34386 15.5264 4.39001C17.8867 6.71533 18.5308 10.2132 17.19 13.2111C17.0948 13.4244 17.1725 13.6738 17.3814 13.7799L18.1623 14.1791C18.3833 14.2917 18.6633 14.201 18.7661 13.9746C20.434 10.2996 19.6531 5.99904 16.7546 3.14304L16.7549 3.14324Z" fill="#112A62"/>
60
- <path d="M16.5625 15.3296C16.2333 15.1962 15.8593 15.2739 15.6099 15.5265C12.5615 18.6197 7.56633 18.6569 4.47345 15.6096C2.11314 13.2843 1.46905 9.78647 2.80986 6.78851C2.90502 6.57523 2.82736 6.32587 2.61846 6.21978L1.83751 5.82055C1.61657 5.7079 1.33656 5.79868 1.23377 6.02509C-0.43528 9.70121 0.346732 14.0017 3.24518 16.8566C6.55702 20.1203 11.655 20.489 15.3717 17.9876L15.3826 19.4215C15.3848 19.6632 15.5817 19.8579 15.8234 19.8557L16.6984 19.8491C16.9401 19.8469 17.1348 19.6501 17.1326 19.4083L17.1086 16.1337C17.1053 15.7805 16.8898 15.4633 16.5628 15.3298L16.5625 15.3296Z" fill="#112A62"/>
61
- </svg>
62
- </span>
63
- <span>Reset password</span>
64
- <% end %>
65
- <% end %>
66
-
67
-
68
- <%# Dynamic check if instance allow users to login through magic links (passes) %>
69
- <%# if Rails.application.config.lesli.dig(:security, :enable_login_link) %>
70
- <% if magic_link %>
71
- <%= link_to("pass_path") do %>
72
- <span class="icon mr-1">
73
- <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
74
- <path d="M17.5 7.25005H15.25C14.6748 7.25005 14.0996 7.34967 13.5498 7.52545C14.1748 8.00005 14.7002 8.57525 15.0996 9.25005H15.25H17.5C19.2998 9.25005 20.75 10.7003 20.75 12.5001C20.75 14.2999 19.2998 15.7501 17.5 15.7501H15.25C15.0996 15.7501 14.9248 15.7247 14.7754 15.7003H14.75C13.2002 15.4503 12 14.125 12 12.5C12 11.5 11.3496 10.6504 10.4502 10.375C10.1504 11.0254 10 11.75 10 12.5C10 15.4005 12.3496 17.75 15.25 17.75H17.5C20.4005 17.75 22.75 15.4004 22.75 12.5C22.75 9.5996 20.4004 7.25 17.5 7.25V7.25005Z" fill="#112A62"/>
75
- <path d="M9.9248 15.7502H7.5C5.7002 15.7502 4.25 14.3 4.25 12.5002C4.25 10.7004 5.7002 9.25024 7.5 9.25024H9.75C11.5498 9.25024 13 10.7004 13 12.5002C13 13.5002 13.6504 14.3498 14.5498 14.6252C14.8496 13.9748 15 13.2502 15 12.5002C15 9.59974 12.6504 7.25024 9.75 7.25024H7.5C4.5995 7.25024 2.25 9.59984 2.25 12.5002C2.25 15.4006 4.5996 17.7502 7.5 17.7502H9.75C10.3252 17.7502 10.9004 17.6506 11.4502 17.4504C10.8496 17.0002 10.3252 16.4006 9.9248 15.7502Z" fill="#112A62"/>
76
- </svg>
77
- </span>
78
- <span>Magic link</span>
79
- <% end %>
80
- <% end %>
81
-
82
-
83
- <%# Dynamic check if instance allow users to login through one time passwords %>
84
- <%# if Rails.application.config.lesli.dig(:security, :enable_login_otp) %>
85
- <% if otp %>
86
- <%= link_to("otp_path") do %>
87
- <span class="icon mr-1">
88
- <svg xmlns="http://www.w3.org/2000/svg" width="23" height="17" fill="none" viewBox="0 0 23.441 17.473">
89
- <path fill="#112a62" d="M6.253 2.41A6.253 6.253 0 0 0 .035 7.997a6.251 6.251 0 0 0 9.323 6.086 6.252 6.252 0 0 0 2.829-3.47h1.097v-.781h-.894a6.104 6.104 0 0 0 0-2.344h9.293l.879 1.172-.88 1.172h-.425l-1.055-1.059a.389.389 0 0 0-.554 0l-1.055 1.059h-.41l-.668-.997a.39.39 0 0 0-.649 0l-.668.997h-.57v.78h.781c.131 0 .252-.066.324-.175l.457-.684.457.684c.073.11.194.175.325.176h.78a.389.389 0 0 0 .278-.113l.895-.899.894.899a.388.388 0 0 0 .278.113h.78a.39.39 0 0 0 .313-.156l1.172-1.563a.39.39 0 0 0 0-.469L22.19 6.863a.39.39 0 0 0-.312-.156h-9.692A6.254 6.254 0 0 0 6.253 2.41Zm0 11.718c-.133 0-.261 0-.39-.02v-.76h.78v.76c-.128.02-.257.02-.39.02zM2.738 6.706h-.782v-.78h.782zm7.031-.78h.781v.78H9.77Zm-1.563 6.25h.782v.78h-.782zm-3.906.78H3.52v-.78H4.3zm6.25-1.562H9.77v-.781h.781ZM6.644 9.761v2.024h-.781V9.76a1.17 1.17 0 0 1-.711-.71H3.128v-.782h2.024a1.172 1.172 0 1 1 1.492 1.492zm-3.906 1.633h-.782v-.781h.782zm5.468-6.25v-.781h.782v.781zm-3.906 0H3.52v-.781H4.3zM1.566 8.269v.781H.804V8.27zm9.375.781V8.27h.781c0 .129.02.258.02.39 0 .133 0 .262-.02.391zM6.644 3.972h-.782v-.781h.781z"/>
90
- <path fill="#112a62" d="m.134 2.09.492.61a8.595 8.595 0 0 1 10.973.125l.508-.594a9.372 9.372 0 0 0-11.973-.14ZM.69 14.774l-.492.609a9.38 9.38 0 0 0 11.973-.14l-.508-.594a8.596 8.596 0 0 1-10.972.125zM9.767 11.786v-.781h.782v.781z"/>
91
- </svg>
92
- </span>
93
- <span>One time password</span>
94
- <% end %>
95
- <% end %>
96
- </div>
@@ -1,16 +0,0 @@
1
- <h2>Resend unlock instructions</h2>
2
-
3
- <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
4
- <%= render "devise/shared/error_messages", resource: resource %>
5
-
6
- <div class="field">
7
- <%= f.label :email %><br />
8
- <%= f.email_field :email, autofocus: true, autocomplete: "email" %>
9
- </div>
10
-
11
- <div class="actions">
12
- <%= f.submit "Resend unlock instructions" %>
13
- </div>
14
- <% end %>
15
-
16
- <%= render "devise/shared/links" %>
@@ -1,59 +0,0 @@
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
- class CreateLesliRoles < ActiveRecord::Migration[7.0]
34
- def change
35
- create_table :lesli_roles do |t|
36
- t.string :name
37
- t.string :code
38
- t.string :description
39
- t.boolean :active
40
-
41
- # redirect users to path after login
42
- t.string :path_default
43
-
44
- # allow users to access resources only inside the :path_default
45
- t.boolean :path_limited
46
-
47
- # allow users to work only with data created or assigned to them
48
- t.boolean :isolated, default: false
49
-
50
- # role hierarchy
51
- t.integer :object_level_permission, default: 10
52
-
53
- t.datetime :deleted_at, index: true
54
- t.timestamps
55
- end
56
-
57
- add_reference(:lesli_roles, :account, foreign_key: { to_table: :lesli_accounts })
58
- end
59
- end
@@ -1,97 +0,0 @@
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 platform.
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
- class CreateLesliUsers < ActiveRecord::Migration[5.2]
34
- def change
35
- create_table :lesli_users do |t|
36
- # Hard-lock strategy
37
- t.boolean :active, default: true, null: false
38
-
39
- # authenticatable
40
- t.string :email, null: false, default: ""
41
- t.string :encrypted_password, null: false, default: ""
42
-
43
- # Customizable
44
- t.string :alias
45
- t.string :salutation
46
- t.string :first_name
47
- t.string :last_name
48
-
49
- # Recoverable
50
- t.string :reset_password_token
51
- t.datetime :reset_password_sent_at
52
-
53
- # Password and access management
54
- t.datetime :password_expiration_at
55
- t.datetime :locked_until
56
-
57
- # Rememberable
58
- t.datetime :remember_created_at
59
-
60
- # Trackable
61
- t.integer :sign_in_count, default: 0, null: false
62
- t.datetime :current_sign_in_at
63
- t.datetime :last_sign_in_at
64
- t.inet :current_sign_in_ip
65
- t.inet :last_sign_in_ip
66
-
67
- # Confirmable
68
- t.string :unconfirmed_email # Only if using reconfirmable
69
- t.string :confirmation_token
70
- t.datetime :confirmation_sent_at
71
- t.datetime :confirmed_at
72
-
73
- # Telephone confirmation (custom)
74
- t.string :telephone
75
- t.string :telephone_confirmation_token
76
- t.datetime :telephone_confirmation_sent_at
77
- t.datetime :telephone_confirmed_at
78
-
79
- # Lockable
80
- t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
81
- t.string :unlock_token # Only if unlock strategy is :email or :both
82
- t.datetime :locked_at
83
-
84
- # Acts as paranoid
85
- t.datetime :deleted_at, index: true
86
- t.timestamps
87
- end
88
-
89
- add_reference(:lesli_users, :account, foreign_key: { to_table: :lesli_accounts })
90
- add_reference(:lesli_accounts, :user, foreign_key: { to_table: :lesli_users })
91
-
92
- add_index(:lesli_users, :email, unique: true)
93
- add_index(:lesli_users, :unlock_token, unique: true)
94
- add_index(:lesli_users, :confirmation_token, unique: true)
95
- add_index(:lesli_users, :reset_password_token, unique: true)
96
- end
97
- end
@@ -1,44 +0,0 @@
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 Development Platform.
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
- class CreateLesliUserSettings < ActiveRecord::Migration[6.0]
34
- def change
35
- create_table :lesli_user_settings do |t|
36
- t.string :name
37
- t.string :value
38
- t.timestamps
39
- end
40
-
41
- add_reference(:lesli_user_settings, :user, foreign_key: { to_table: :lesli_users })
42
- add_index(:lesli_user_settings, %i[user_id name], unique: true)
43
- end
44
- end