lesli 5.0.3 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/lesli_manifest.js +2 -1
  3. data/app/assets/javascripts/lesli/users/confirmations.js +32 -0
  4. data/app/assets/javascripts/lesli/users/passwords.js +3 -3
  5. data/app/assets/javascripts/lesli/users/registrations.js +2 -2
  6. data/app/assets/javascripts/lesli/users/sessions.js +2 -2
  7. data/app/assets/stylesheets/lesli/users/confirmations.scss +28 -6
  8. data/app/controllers/lesli/interfaces/application/authorization.rb +2 -2
  9. data/app/controllers/lesli/interfaces/application/logger.rb +14 -38
  10. data/app/controllers/lesli/roles_controller.rb +3 -1
  11. data/app/controllers/users/confirmations_controller.rb +63 -27
  12. data/app/controllers/users/passwords_controller.rb +70 -30
  13. data/app/controllers/users/sessions_controller.rb +2 -4
  14. data/app/lib/lesli/system.rb +13 -5
  15. data/app/mailers/lesli/application_lesli_mailer.rb +8 -19
  16. data/app/mailers/lesli/devise_mailer.rb +29 -3
  17. data/app/models/concerns/account_initializer.rb +91 -0
  18. data/app/models/concerns/{user_guard.rb → user_security.rb} +7 -8
  19. data/app/models/lesli/account.rb +8 -26
  20. data/app/models/lesli/application_lesli_record.rb +1 -0
  21. data/app/models/lesli/descriptor/privilege.rb +38 -0
  22. data/app/models/lesli/descriptor.rb +18 -1
  23. data/app/models/lesli/role/power.rb +70 -0
  24. data/app/models/lesli/role/privilege.rb +38 -0
  25. data/app/models/lesli/role.rb +20 -15
  26. data/app/models/lesli/user/{role.rb → power.rb} +1 -1
  27. data/app/{services/lesli/role_service.rb → models/lesli/user/setting.rb} +10 -9
  28. data/app/models/lesli/user.rb +11 -20
  29. data/app/operators/lesli/descriptor_privilege_operator.rb +75 -0
  30. data/app/operators/lesli/role_power_operator.rb +108 -0
  31. data/app/operators/lesli/user_registration_operator.rb +121 -0
  32. data/app/services/lesli/user_service.rb +2 -4
  33. data/app/services/lesli/{user/session_service.rb → user_session_service.rb} +11 -4
  34. data/app/views/devise/confirmations/new.html.erb +0 -14
  35. data/app/views/devise/confirmations/show.html.erb +63 -0
  36. data/app/views/devise/passwords/edit.html.erb +78 -24
  37. data/app/views/devise/passwords/new.html.erb +1 -2
  38. data/app/views/lesli/emails/devise_mailer/confirmation_instructions.html.erb +1 -1
  39. data/app/views/lesli/emails/devise_mailer/reset_password_instructions.html.erb +23 -0
  40. data/app/views/lesli/partials/_application-lesli-header.html.erb +3 -1
  41. data/config/initializers/devise.rb +2 -0
  42. data/db/migrate/v1.0/0010000110_create_lesli_accounts.rb +2 -0
  43. data/db/{tables/0010001010_create_account_settings.rb → migrate/v1.0/0010001010_create_lesli_account_settings.rb} +5 -5
  44. data/db/{tables/0010003110_create_user_settings.rb → migrate/v1.0/0010003110_create_lesli_user_settings.rb} +4 -4
  45. data/db/migrate/v1.0/0010003210_create_lesli_user_sessions.rb +6 -2
  46. data/db/migrate/v1.0/{0010003410_create_lesli_user_roles.rb → 0010003410_create_lesli_user_powers.rb} +4 -4
  47. data/db/migrate/v1.0/0010005010_create_lesli_descriptors.rb +1 -1
  48. data/db/migrate/v1.0/{0010003910_create_lesli_user_agents.rb → 0010005510_create_lesli_role_powers.rb} +7 -9
  49. data/db/{tables/0010005710_create_role_privileges.rb → migrate/v1.0/0010005710_create_lesli_role_privileges.rb} +6 -6
  50. data/db/seed/development/users.rb +4 -4
  51. data/db/seed/tools.rb +4 -4
  52. data/lib/lesli/engine.rb +33 -10
  53. data/lib/lesli/version.rb +1 -1
  54. data/lib/sass/lesli/bulma/loader.scss +3 -0
  55. data/lib/sass/lesli/pages/devise-simple.scss +2 -1
  56. data/lib/tasks/lesli/controllers.rake +3 -6
  57. data/lib/tasks/lesli/db.rake +11 -1
  58. data/lib/tasks/lesli/role.rake +54 -0
  59. data/lib/vue/application.js +9 -2
  60. data/lib/vue/devise/passwords.js +3 -3
  61. data/lib/vue/layouts/application-header.vue +10 -3
  62. data/lib/webpack/core.js +2 -1
  63. data/readme.md +23 -7
  64. metadata +22 -18
  65. data/app/models/concerns/account_engines.rb +0 -249
  66. data/app/models/concerns/user_polyfill.rb +0 -134
  67. data/config/locales/translations.en.yml +0 -7
  68. data/config/locales/translations.es.yml +0 -7
  69. data/db/migrate/v1.0/0010001510_create_lesli_account_requests.rb +0 -45
  70. data/db/migrate/v1.0/0010003810_create_lesli_user_requests.rb +0 -44
  71. data/db/tables/0010005510_create_role_descriptors.rb +0 -44
@@ -0,0 +1,63 @@
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
+ <% content_for :application_custom_assets do %>
36
+ <script>
37
+ //setTimeout(() => { window.location.href = "/"; }, 10000)
38
+ </script>
39
+ <% end %>
40
+
41
+ <%= render("lesli/wrappers/application-devise-simple", title: "Account confirmation") do %>
42
+
43
+ <% if flash[:danger] %>
44
+ <% flash.each do |type, msg| %>
45
+ <div class="notification is-<%= type %>">
46
+ <%= msg %>
47
+ </div>
48
+ <% end %>
49
+ <% end %>
50
+
51
+ <% if flash[:success] %>
52
+ <div class="confirmation-message">
53
+ <svg version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
54
+ <path d="M256,6.998c-137.533,0-249,111.467-249,249c0,137.534,111.467,249,249,249s249-111.467,249-249 C505,118.464,393.533,6.998,256,6.998z M256,485.078c-126.309,0-229.08-102.771-229.08-229.081 c0-126.31,102.771-229.08,229.08-229.08c126.31,0,229.08,102.771,229.08,229.08C485.08,382.307,382.31,485.078,256,485.078z"/>
55
+ <polygon points="384.235,158.192 216.919,325.518 127.862,236.481 113.72,250.624 216.919,353.803 398.28,172.334"/>
56
+ </svg>
57
+ <p>Confirmation successfully</p>
58
+ </div>
59
+ <% end %>
60
+
61
+ <% end %>
62
+
63
+
@@ -1,25 +1,79 @@
1
- <h2>Change your password</h2>
2
-
3
- <%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
4
- <%= render "devise/shared/error_messages", resource: resource %>
5
- <%= f.hidden_field :reset_password_token %>
6
-
7
- <div class="field">
8
- <%= f.label :password, "New password" %><br />
9
- <% if @minimum_password_length %>
10
- <em>(<%= @minimum_password_length %> characters minimum)</em><br />
11
- <% end %>
12
- <%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
13
- </div>
14
-
15
- <div class="field">
16
- <%= f.label :password_confirmation, "Confirm new password" %><br />
17
- <%= f.password_field :password_confirmation, autocomplete: "new-password" %>
18
- </div>
19
-
20
- <div class="actions">
21
- <%= f.submit "Change my password" %>
22
- </div>
23
- <% end %>
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/.
24
20
 
25
- <%= render "devise/shared/links" %>
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-simple", title: "Cambiar contraseña") do %>
36
+
37
+ <form ref="form" @submit="putPasswordEdit">
38
+ <p v-if="notification.show" :class="[notification.type, 'is-size-5', 'mt-2']">
39
+ {{ notification.message }}
40
+ </p>
41
+ <div class="field mb-4">
42
+ <p class="label mb-2">Ingrese su nueva contraseña</p>
43
+ <p class="control has-icons-left">
44
+ <input
45
+ class="input"
46
+ type="password"
47
+ v-model="password_edit.new_password"
48
+ required="true"
49
+ name="user_email"
50
+ placeholder="Contraseña nueva"
51
+ />
52
+ <span class="icon is-small is-left">
53
+ <i class="ri-key-line"></i>
54
+ </span>
55
+ </p>
56
+ </div>
57
+ <div class="field mb-4">
58
+ <p class="label mb-1">Confirmar contraseña</p>
59
+ <p class="control has-icons-left">
60
+ <input
61
+ class="input"
62
+ type="password"
63
+ v-model="password_edit.new_password_confirmation"
64
+ required="true"
65
+ name="user_email"
66
+ placeholder="Confirmar contraseña"
67
+ />
68
+ <span class="icon is-small is-left">
69
+ <i class="ri-key-2-line"></i>
70
+ </span>
71
+ </p>
72
+ </div>
73
+ <div class="login-controls has-text-centered">
74
+ <button class="button is-primary">
75
+ Cambiar contraseña
76
+ </button>
77
+ </div>
78
+ </form>
79
+ <% end %>
@@ -33,8 +33,7 @@ Building a better future, one line of code at a time.
33
33
  %>
34
34
 
35
35
 
36
- <%= render("lesli/wrappers/application-devise-simple",
37
- title: "Forgot your password?") do %>
36
+ <%= render("lesli/wrappers/application-devise-simple", title: "Forgot your password?") do %>
38
37
 
39
38
  <form class="has-text-centered" @submit="postPasswordNew" method="post">
40
39
 
@@ -20,4 +20,4 @@
20
20
  }</style><style media="screen and (min-width:480px)">.moz-text-html .mj-column-per-100 { width:100% !important; max-width: 100%; }</style><style type="text/css">@media only screen and (max-width:479px) {
21
21
  table.mj-full-width-mobile { width: 100% !important; }
22
22
  td.mj-full-width-mobile { width: auto !important; }
23
- }</style><style type="text/css"></style></head><body style="word-spacing:normal;background-color:#ebecf0;"><div style="background-color:#ebecf0;"><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:0px;padding-top:60px;padding-bottom:0px;padding-left:5px;word-break:break-word;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;"><tbody><tr><td style="width:125px;"><img src="https://cdn.lesli.tech/leslicloud/brand/app-logo.png" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="125" height="auto"></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:5px;line-height:5px;">&#8202;</div><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#4a5056;"><h1>Welcome to Lesli</h1></div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" bgcolor="#ffffff" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="background:#ffffff;background-color:#ffffff;margin:0px auto;border-radius:15px;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;border-radius:15px;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:40px;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:520px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td style="font-size:0px;word-break:break-word;"><div style="height:15px;line-height:15px;">&#8202;</div></td></tr><tr><td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:16px;line-height:1.4;text-align:left;color:#4a5056;"><p>Your account is almost ready. Please take a moment to validate your email address so that we know it's you.</p></div></td></tr><tr><td align="center" vertical-align="middle" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:separate;line-height:100%;"><tbody><tr><td align="center" bgcolor="#eef6fc" role="presentation" style="border:1px solid #209cee;border-radius:5px;cursor:auto;mso-padding-alt:10px;background:#eef6fc;" valign="middle"><a href="<%= url_for(@app[:host] + @data[:url]) %>" style="display:inline-block;background:#eef6fc;color:#209cee;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:17px;font-weight:normal;line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:10px;mso-padding-alt:0px;border-radius:5px;" target="_blank">Confirm my account</a></td></tr></tbody></table></td></tr><tr><td style="font-size:0px;word-break:break-word;"><div style="height:25px;line-height:25px;">&#8202;</div></td></tr><tr><td style="background:#DBDBDB;font-size:0px;word-break:break-word;"><div style="height:2px;line-height:2px;">&#8202;</div></td></tr><tr><td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;"><p>Please keep in mind that this link is valid for only 3 hours.</p></div></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:30px;line-height:30px;">&#8202;</div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:18px;font-weight:600;line-height:1;text-align:center;color:#444444;">¡Siguenos!</div></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table cellpadding="0" cellspacing="0" width="300" border="0" style="color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;table-layout:auto;width:300px;border:none;"><tr><td align="center"><img width="45px" alt="Facebook" src="https://cdn.lesli.tech/leslicloud/emails/social-facebook.png"></td><td align="center"><img width="45px" alt="Twitter" src="https://cdn.lesli.tech/leslicloud/emails/social-twitter.png"></td><td align="center"><img width="45px" alt="Instagram" src="https://cdn.lesli.tech/leslicloud/emails/social-instagram.png"></td><td align="center"><img width="45px" alt="Linkedin" src="https://cdn.lesli.tech/leslicloud/emails/social-linkedin.png"></td></tr></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:18px;font-weight:600;line-height:1;text-align:center;color:#444444;">Download our app</div></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table cellpadding="0" cellspacing="0" width="100%" border="0" style="color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;table-layout:auto;width:100%;border:none;"><tr><td style="text-align: right; padding: 5px;"><a target="blank" href="https://apps.apple.com/us/app/lesli/id1595893730"><img width="130px" alt="Appstore badge" src="https://cdn.lesli.tech/leslicloud/emails/appstore.png"></a></td><td style="text-align: left; padding: 5px;"><a target="blank" href="https://apps.apple.com/us/app/lesli/id1595893730"><img width="130px" alt="Playstore badge" src="https://cdn.lesli.tech/leslicloud/emails/playstore.png"></a></td></tr></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:10px;line-height:10px;">&#8202;</div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">Copyright &copy; <%= Time.new.year %> LesliTech</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">Ciudad de Guatemala, Guatemala.</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">All rights reserved.</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;padding-top:20px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">The Lesli Team</div></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></div></body></html>
23
+ }</style><style type="text/css"></style></head><body style="word-spacing:normal;background-color:#ebecf0;"><div style="background-color:#ebecf0;"><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:0px;padding-top:60px;padding-bottom:0px;padding-left:5px;word-break:break-word;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;"><tbody><tr><td style="width:125px;"><img src="https://cdn.lesli.tech/leslicloud/brand/app-logo.png" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="125" height="auto"></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:5px;line-height:5px;">&#8202;</div><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#4a5056;"><h1>Welcome to Lesli</h1></div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" bgcolor="#ffffff" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="background:#ffffff;background-color:#ffffff;margin:0px auto;border-radius:15px;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;border-radius:15px;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:40px;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:520px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td style="font-size:0px;word-break:break-word;"><div style="height:15px;line-height:15px;">&#8202;</div></td></tr><tr><td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:16px;line-height:1.4;text-align:left;color:#4a5056;"><p>Your account is almost ready. Please take a moment to validate your email address so that we know it's you.</p></div></td></tr><tr><td align="center" vertical-align="middle" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:separate;line-height:100%;"><tbody><tr><td align="center" bgcolor="#eef6fc" role="presentation" style="border:1px solid #209cee;border-radius:5px;cursor:auto;mso-padding-alt:10px;background:#eef6fc;" valign="middle"><a href="<%= url_for(@params[:host] + @params[:url]) %>" style="display:inline-block;background:#eef6fc;color:#209cee;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:17px;font-weight:normal;line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:10px;mso-padding-alt:0px;border-radius:5px;" target="_blank">Confirm my account</a></td></tr></tbody></table></td></tr><tr><td style="font-size:0px;word-break:break-word;"><div style="height:25px;line-height:25px;">&#8202;</div></td></tr><tr><td style="background:#DBDBDB;font-size:0px;word-break:break-word;"><div style="height:2px;line-height:2px;">&#8202;</div></td></tr><tr><td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;"><p>Please keep in mind that this link is valid for only 3 hours.</p></div></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:30px;line-height:30px;">&#8202;</div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:18px;font-weight:600;line-height:1;text-align:center;color:#444444;">¡Siguenos!</div></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table cellpadding="0" cellspacing="0" width="300" border="0" style="color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;table-layout:auto;width:300px;border:none;"><tr><td align="center"><img width="45px" alt="Facebook" src="https://cdn.lesli.tech/leslicloud/emails/social-facebook.png"></td><td align="center"><img width="45px" alt="Twitter" src="https://cdn.lesli.tech/leslicloud/emails/social-twitter.png"></td><td align="center"><img width="45px" alt="Instagram" src="https://cdn.lesli.tech/leslicloud/emails/social-instagram.png"></td><td align="center"><img width="45px" alt="Linkedin" src="https://cdn.lesli.tech/leslicloud/emails/social-linkedin.png"></td></tr></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:18px;font-weight:600;line-height:1;text-align:center;color:#444444;">Download our app</div></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table cellpadding="0" cellspacing="0" width="100%" border="0" style="color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;table-layout:auto;width:100%;border:none;"><tr><td style="text-align: right; padding: 5px;"><a target="blank" href="https://apps.apple.com/us/app/lesli/id1595893730"><img width="130px" alt="Appstore badge" src="https://cdn.lesli.tech/leslicloud/emails/appstore.png"></a></td><td style="text-align: left; padding: 5px;"><a target="blank" href="https://apps.apple.com/us/app/lesli/id1595893730"><img width="130px" alt="Playstore badge" src="https://cdn.lesli.tech/leslicloud/emails/playstore.png"></a></td></tr></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:10px;line-height:10px;">&#8202;</div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">Copyright &copy; <%= Time.new.year %> LesliTech</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">Ciudad de Guatemala, Guatemala.</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">All rights reserved.</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;padding-top:20px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">The Lesli Team</div></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></div></body></html>
@@ -0,0 +1,23 @@
1
+ <!doctype html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><title></title><!--[if !mso]><!--><meta http-equiv="X-UA-Compatible" content="IE=edge"><!--<![endif]--><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><style type="text/css">#outlook a { padding:0; }
2
+ body { margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%; }
3
+ table, td { border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt; }
4
+ img { border:0;height:auto;line-height:100%; outline:none;text-decoration:none;-ms-interpolation-mode:bicubic; }
5
+ p { display:block;margin:13px 0; }</style><!--[if mso]>
6
+ <noscript>
7
+ <xml>
8
+ <o:OfficeDocumentSettings>
9
+ <o:AllowPNG/>
10
+ <o:PixelsPerInch>96</o:PixelsPerInch>
11
+ </o:OfficeDocumentSettings>
12
+ </xml>
13
+ </noscript>
14
+ <![endif]--><!--[if lte mso 11]>
15
+ <style type="text/css">
16
+ .mj-outlook-group-fix { width:100% !important; }
17
+ </style>
18
+ <![endif]--><!--[if !mso]><!--><link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700" rel="stylesheet" type="text/css"><style type="text/css">@import url(https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700);</style><!--<![endif]--><style type="text/css">@media only screen and (min-width:480px) {
19
+ .mj-column-per-100 { width:100% !important; max-width: 100%; }
20
+ }</style><style media="screen and (min-width:480px)">.moz-text-html .mj-column-per-100 { width:100% !important; max-width: 100%; }</style><style type="text/css">@media only screen and (max-width:479px) {
21
+ table.mj-full-width-mobile { width: 100% !important; }
22
+ td.mj-full-width-mobile { width: auto !important; }
23
+ }</style><style type="text/css"></style></head><body style="word-spacing:normal;background-color:#ebecf0;"><div style="background-color:#ebecf0;"><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:0px;padding-top:60px;padding-bottom:0px;padding-left:5px;word-break:break-word;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;"><tbody><tr><td style="width:125px;"><img src="https://cdn.lesli.tech/leslicloud/brand/app-logo.png" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="125" height="auto"></td></tr></tbody></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:5px;line-height:5px;">&#8202;</div><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#4a5056;"><h1><raw><% name = @params.dig(:user_name) %></raw><raw><%= !name.blank? ? "Hi #{name.strip}." : nil %></raw></h1></div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" bgcolor="#ffffff" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="background:#ffffff;background-color:#ffffff;margin:0px auto;border-radius:15px;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#ffffff;background-color:#ffffff;width:100%;border-radius:15px;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:40px;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:520px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td style="font-size:0px;word-break:break-word;"><div style="height:15px;line-height:15px;">&#8202;</div></td></tr><tr><td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:16px;line-height:1.4;text-align:left;color:#4a5056;"><p>We've received a request to reset your password.</p><p>If you didn’t make the request, please ignore this message. Otherwise, you can reset your password using this link:</p></div></td></tr><tr><td align="center" vertical-align="middle" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:separate;line-height:100%;"><tbody><tr><td align="center" bgcolor="#eef6fc" role="presentation" style="border:1px solid #209cee;border-radius:5px;cursor:auto;mso-padding-alt:10px;background:#eef6fc;" valign="middle"><a href="<%= url_for(@params[:host] + @params[:url]) %>" style="display:inline-block;background:#eef6fc;color:#209cee;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:17px;font-weight:normal;line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:10px;mso-padding-alt:0px;border-radius:5px;" target="_blank">Click here to reset password</a></td></tr></tbody></table></td></tr><tr><td style="font-size:0px;word-break:break-word;"><div style="height:25px;line-height:25px;">&#8202;</div></td></tr><tr><td style="background:#DBDBDB;font-size:0px;word-break:break-word;"><div style="height:2px;line-height:2px;">&#8202;</div></td></tr><tr><td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;"><p>Please keep in mind that this link is valid for only 3 hours.</p></div></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:30px;line-height:30px;">&#8202;</div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:18px;font-weight:600;line-height:1;text-align:center;color:#444444;">¡Siguenos!</div></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table cellpadding="0" cellspacing="0" width="300" border="0" style="color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;table-layout:auto;width:300px;border:none;"><tr><td align="center"><img width="45px" alt="Facebook" src="https://cdn.lesli.tech/leslicloud/emails/social-facebook.png"></td><td align="center"><img width="45px" alt="Twitter" src="https://cdn.lesli.tech/leslicloud/emails/social-twitter.png"></td><td align="center"><img width="45px" alt="Instagram" src="https://cdn.lesli.tech/leslicloud/emails/social-instagram.png"></td><td align="center"><img width="45px" alt="Linkedin" src="https://cdn.lesli.tech/leslicloud/emails/social-linkedin.png"></td></tr></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:18px;font-weight:600;line-height:1;text-align:center;color:#444444;">Download our app</div></td></tr><tr><td align="center" style="font-size:0px;padding:10px 25px;word-break:break-word;"><table cellpadding="0" cellspacing="0" width="100%" border="0" style="color:#000000;font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:22px;table-layout:auto;width:100%;border:none;"><tr><td style="text-align: right; padding: 5px;"><a target="blank" href="https://apps.apple.com/us/app/lesli/id1595893730"><img width="130px" alt="Appstore badge" src="https://cdn.lesli.tech/leslicloud/emails/appstore.png"></a></td><td style="text-align: left; padding: 5px;"><a target="blank" href="https://apps.apple.com/us/app/lesli/id1595893730"><img width="130px" alt="Playstore badge" src="https://cdn.lesli.tech/leslicloud/emails/playstore.png"></a></td></tr></table></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--><div style="height:10px;line-height:10px;">&#8202;</div><!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" role="presentation" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]--><div style="margin:0px auto;max-width:600px;"><table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;"><tbody><tr><td style="direction:ltr;font-size:0px;padding:20px 0;text-align:center;"><!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:600px;" ><![endif]--><div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;"><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%"><tbody><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">Copyright &copy; <%= Time.new.year %> LesliTech</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">Ciudad de Guatemala, Guatemala.</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">All rights reserved.</div></td></tr><tr><td align="center" style="font-size:0px;padding:4px;padding-top:20px;word-break:break-word;"><div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:center;color:#666666;">The Lesli Team</div></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></td></tr></tbody></table></div><!--[if mso | IE]></td></tr></table><![endif]--></div></body></html>
@@ -34,10 +34,12 @@ Building a better future, one line of code at a time.
34
34
 
35
35
  <lesli-application-header
36
36
  <%= "show-bell" if defined?(CloudBell) %>
37
- <%= "show-announcements" if defined?(CloudBell) %>
38
37
  <%= "show-focus" if defined?(CloudFocus) %>
39
38
  <%= "show-tickets" if defined?(CloudHelp) %>
39
+ <%= "show-announcements" if defined?(CloudBell) %>
40
+ engine-path="<%= lesli_engine(:path) %>"
40
41
  :show-engines="true">
42
+
41
43
 
42
44
  <%# language selector %>
43
45
  <% if I18n.available_locales.length > 1 %>
@@ -315,6 +315,8 @@ end
315
315
 
316
316
  Devise.setup do |config|
317
317
 
318
+ config.mailer = "Lesli::DeviseMailer"
319
+
318
320
  # Mount devise through Lesli engine
319
321
  config.router_name = :lesli
320
322
 
@@ -64,6 +64,8 @@ class CreateLesliAccounts < ActiveRecord::Migration[5.2]
64
64
  t.string :linkedin
65
65
  t.string :facebook
66
66
 
67
+ # Acts as paranoid
68
+ t.datetime :deleted_at, index: true
67
69
  t.timestamps
68
70
  end
69
71
  end
@@ -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 development platform.
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,16 +27,16 @@ 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
- // ·
30
+ // ·
31
31
  =end
32
32
 
33
- class CreateAccountSettings < ActiveRecord::Migration[6.0]
33
+ class CreateLesliAccountSettings < ActiveRecord::Migration[6.0]
34
34
  def change
35
- create_table :account_settings do |t|
35
+ create_table :lesli_account_settings do |t|
36
36
  t.string :name
37
37
  t.string :value
38
38
  t.timestamps
39
39
  end
40
- add_reference(:account_settings, :account, foreign_key: { to_table: :accounts })
40
+ add_reference(:lesli_account_settings, :account, foreign_key: { to_table: :lesli_accounts })
41
41
  end
42
42
  end
@@ -30,15 +30,15 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- class CreateUserSettings < ActiveRecord::Migration[6.0]
33
+ class CreateLesliUserSettings < ActiveRecord::Migration[6.0]
34
34
  def change
35
- create_table :user_settings do |t|
35
+ create_table :lesli_user_settings do |t|
36
36
  t.string :name
37
37
  t.string :value
38
38
  t.timestamps
39
39
  end
40
40
 
41
- add_reference(:user_settings, :user, foreign_key: { to_table: :users })
42
- add_index(:user_settings, %i[user_id name], unique: true)
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
43
  end
44
44
  end
@@ -33,8 +33,12 @@ Building a better future, one line of code at a time.
33
33
  class CreateLesliUserSessions < ActiveRecord::Migration[6.0]
34
34
  def change
35
35
  create_table :lesli_user_sessions do |t|
36
- t.inet :user_remote # IPv4 and IPv6 hosts and networks
37
- t.string :user_agent
36
+ t.inet :remote # IPv4 and IPv6 hosts and networks
37
+
38
+ t.string :agent_platform
39
+ t.string :agent_os
40
+ t.string :agent_browser
41
+ t.string :agent_version
38
42
 
39
43
  t.string :session_token # authentication token
40
44
  t.string :session_source # session created for/with
@@ -30,14 +30,14 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- class CreateLesliUserRoles < ActiveRecord::Migration[6.0]
33
+ class CreateLesliUserPowers < ActiveRecord::Migration[6.0]
34
34
  def change
35
- create_table :lesli_user_roles do |t|
35
+ create_table :lesli_user_powers do |t|
36
36
  t.datetime :deleted_at, index: true
37
37
  t.timestamps
38
38
  end
39
39
 
40
- add_reference(:lesli_user_roles, :user, foreign_key: { to_table: :lesli_users })
41
- add_reference(:lesli_user_roles, :role, foreign_key: { to_table: :lesli_roles })
40
+ add_reference(:lesli_user_powers, :user, foreign_key: { to_table: :lesli_users })
41
+ add_reference(:lesli_user_powers, :role, foreign_key: { to_table: :lesli_roles })
42
42
  end
43
43
  end
@@ -34,7 +34,7 @@ class CreateLesliDescriptors < ActiveRecord::Migration[7.0]
34
34
  def change
35
35
  create_table :lesli_descriptors do |t|
36
36
  t.string :name
37
- t.string :category
37
+ t.string :method
38
38
  t.datetime :deleted_at, index: true
39
39
  t.timestamps
40
40
  end
@@ -30,17 +30,15 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- class CreateLesliUserAgents < ActiveRecord::Migration[7.0]
33
+ class CreateLesliRolePowers < ActiveRecord::Migration[7.0]
34
34
  def change
35
- create_table :lesli_user_agents do |t|
36
- t.string :platform
37
- t.string :os
38
- t.string :browser
39
- t.string :version
40
- t.integer :count
35
+ create_table :lesli_role_powers do |t|
36
+ t.datetime :deleted_at, index: true
41
37
  t.timestamps
42
38
  end
43
- add_reference(:lesli_user_agents, :user, foreign_key: { to_table: :lesli_users })
44
- add_index(:lesli_user_agents, %i[platform os browser version user_id], unique: true, name: "lesli_user_agents_index")
39
+
40
+ add_reference(:lesli_role_powers, :user, foreign_key: { to_table: :lesli_users })
41
+ add_reference(:lesli_role_powers, :role, foreign_key: { to_table: :lesli_roles })
42
+ add_reference(:lesli_role_powers, :descriptor, foreign_key: { to_table: :lesli_descriptors })
45
43
  end
46
44
  end
@@ -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 development platform.
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,19 +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
- // ·
30
+ // ·
31
31
  =end
32
32
 
33
- class CreateRolePrivileges < ActiveRecord::Migration[7.0]
33
+ class CreateLesliRolePrivileges < ActiveRecord::Migration[7.0]
34
34
  def change
35
- create_table :role_privileges do |t|
35
+ create_table :lesli_role_privileges do |t|
36
36
  t.string :controller
37
37
  t.string :action
38
38
  t.boolean :active
39
39
  t.datetime :deleted_at, index: true
40
40
  t.timestamps
41
41
  end
42
- add_reference(:role_privileges, :role, foreign_key: { to_table: :roles })
43
- add_index(:role_privileges, %i[controller action role_id], unique: true, name: "role_privileges_index")
42
+ add_reference(:lesli_role_privileges, :role, foreign_key: { to_table: :lesli_roles })
43
+ add_index(:lesli_role_privileges, %i[controller action role_id], unique: true, name: "role_privileges_index")
44
44
  end
45
45
  end
@@ -43,11 +43,11 @@ user.account.save!
43
43
 
44
44
  # core development users
45
45
  [
46
- ["ldonis@lesli.tech", "owner", "Luis", "Donis"],
47
- ["admin@lesli.tech", "sysadmin", "Admin", "Lesli"],
48
- ["guest@lesli.tech", "limited", "Guest", "Lesli"],
46
+ ["ldonis@lesli.tech", "owner", "Luis", "Donis"],
47
+ ["admin@lesli.tech", "sysadmin","Admin","Lesli"],
48
+ ["guest@lesli.tech", "limited", "Guest","Lesli"],
49
49
  ["test@lesli.tech", "sysadmin", "Test", "Lesli"],
50
50
  ].each do |user|
51
51
  create_development_user(user[0], user[1], user[2], user[3])
52
- L2.m("User #{ user[2] } <#{ user[0] }> successfully created!")
52
+ L2.m("User #{ user[2] } <#{ user[0] }> successfully created as #{ user[1] }.")
53
53
  end
data/db/seed/tools.rb CHANGED
@@ -17,16 +17,16 @@ 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 · Your Smart Business Assistant.
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
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
30
  // ·
31
31
  =end
32
32
 
@@ -53,7 +53,7 @@ def create_development_user email, rolename, firstname, lastname, password:nil
53
53
  user.last_name = lastname
54
54
  user.save!
55
55
 
56
- #user.user_roles.create!({ role: Role.find_by("name" => rolename) })
56
+ user.powers.create!({ role: Lesli::Role.find_by(:name => rolename) })
57
57
 
58
58
  user
59
59
  end
data/lib/lesli/engine.rb CHANGED
@@ -39,6 +39,7 @@ require "L2"
39
39
  require "devise"
40
40
  require "useragent"
41
41
  require "flag-icons-rails"
42
+ require "acts_as_paranoid"
42
43
 
43
44
  module Lesli
44
45
  class Engine < ::Rails::Engine
@@ -46,6 +47,21 @@ module Lesli
46
47
 
47
48
  initializer :lesli do |app|
48
49
 
50
+
51
+ # Lesli standard engine configuration
52
+
53
+
54
+ # register assets manifest
55
+ config.assets.precompile += %w[lesli_manifest.js]
56
+
57
+ # register engine migrations path
58
+ unless app.root.to_s.match root.to_s
59
+ config.paths["db/migrate"].expanded.each do |expanded_path|
60
+ app.config.paths["db/migrate"] << expanded_path
61
+ end
62
+ end
63
+
64
+
49
65
  # Lesli Framework configuration
50
66
 
51
67
 
@@ -65,21 +81,28 @@ module Lesli
65
81
  # if this is not false Rails will fingerprint the assets by default and precompile is needed
66
82
  config.assets.digest = false
67
83
 
84
+
85
+ # Lesli Framework Mailer configuration
86
+
87
+
88
+ # Development mailer by default
89
+ config.action_mailer.delivery_method ||= :letter_opener
90
+
91
+ # Add the Lesli root folder for email development tempaltes
68
92
  config.action_mailer.preview_path = root.join("lib", "mailer_previews")
69
93
 
94
+ config.action_mailer.default_options ||= {
70
95
 
71
- # Lesli standard engine configuration
96
+ # Use the main email in the lesli settings as email sender
97
+ from: config.company.dig(:email)
98
+ }
72
99
 
73
-
74
- # register assets manifest
75
- config.assets.precompile += %w[lesli_manifest.js]
76
100
 
77
- # register engine migrations path
78
- unless app.root.to_s.match root.to_s
79
- config.paths["db/migrate"].expanded.each do |expanded_path|
80
- app.config.paths["db/migrate"] << expanded_path
81
- end
82
- end
101
+
102
+ # Mailer url options for development
103
+ config.action_mailer.default_url_options ||= {
104
+ host: "http://0.0.0.0:3000"
105
+ }
83
106
  end
84
107
  end
85
108
  end