lesli_guard 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +38 -0
  3. data/app/assets/config/lesli_guard_manifest.js +38 -0
  4. data/app/assets/images/lesli_guard/guard-logo.svg +160 -0
  5. data/app/assets/javascripts/lesli_guard/application.js +4787 -0
  6. data/app/assets/stylesheets/lesli_guard/application.scss +33 -0
  7. data/app/assets/stylesheets/lesli_guard/dashboards.scss +32 -0
  8. data/app/assets/stylesheets/lesli_guard/descriptors.scss +32 -0
  9. data/app/assets/stylesheets/lesli_guard/roles.scss +32 -0
  10. data/app/assets/stylesheets/lesli_guard/system_controller.scss +32 -0
  11. data/app/assets/stylesheets/lesli_guard/users.scss +67 -0
  12. data/app/controllers/lesli_guard/accounts_controller.rb +60 -0
  13. data/app/controllers/lesli_guard/application_controller.rb +37 -0
  14. data/app/controllers/lesli_guard/dashboard/components_controller.rb +60 -0
  15. data/app/controllers/lesli_guard/dashboards_controller.rb +36 -0
  16. data/app/controllers/lesli_guard/descriptor/activities_controller.rb +122 -0
  17. data/app/controllers/lesli_guard/descriptor/privileges_controller.rb +112 -0
  18. data/app/controllers/lesli_guard/descriptors_controller.rb +129 -0
  19. data/app/controllers/lesli_guard/role/activities_controller.rb +76 -0
  20. data/app/controllers/lesli_guard/role/descriptors_controller.rb +97 -0
  21. data/app/controllers/lesli_guard/role/privileges_controller.rb +47 -0
  22. data/app/controllers/lesli_guard/roles_controller.rb +185 -0
  23. data/app/controllers/lesli_guard/user/roles_controller.rb +98 -0
  24. data/app/controllers/lesli_guard/user/sessions_controller.rb +71 -0
  25. data/app/controllers/lesli_guard/users_controller.rb +206 -0
  26. data/app/helpers/lesli_guard/accounts_helper.rb +4 -0
  27. data/app/helpers/lesli_guard/application_helper.rb +4 -0
  28. data/app/helpers/lesli_guard/dashboards_helper.rb +4 -0
  29. data/app/helpers/lesli_guard/descriptor/activities_helper.rb +4 -0
  30. data/app/helpers/lesli_guard/descriptor/privileges_helper.rb +4 -0
  31. data/app/helpers/lesli_guard/descriptors_helper.rb +4 -0
  32. data/app/helpers/lesli_guard/role/activities_helper.rb +4 -0
  33. data/app/helpers/lesli_guard/role/descriptors_helper.rb +4 -0
  34. data/app/helpers/lesli_guard/role/privileges_helper.rb +4 -0
  35. data/app/helpers/lesli_guard/roles_helper.rb +4 -0
  36. data/app/jobs/lesli_guard/application_job.rb +37 -0
  37. data/app/mailers/lesli_guard/application_mailer.rb +39 -0
  38. data/app/models/lesli_guard/account.rb +43 -0
  39. data/app/models/lesli_guard/application_record.rb +37 -0
  40. data/app/models/lesli_guard/dashboard/component.rb +42 -0
  41. data/app/models/lesli_guard/dashboard.rb +58 -0
  42. data/app/models/lesli_guard/descriptor/activity.rb +40 -0
  43. data/app/models/lesli_guard/descriptor/privilege.rb +40 -0
  44. data/app/models/lesli_guard/descriptor.rb +41 -0
  45. data/app/models/lesli_guard/role/activity.rb +40 -0
  46. data/app/services/lesli_guard/descriptor_privilege_service.rb +74 -0
  47. data/app/services/lesli_guard/descriptor_service.rb +152 -0
  48. data/app/services/lesli_guard/role_descriptor_service.rb +61 -0
  49. data/app/services/lesli_guard/role_service.rb +215 -0
  50. data/app/services/lesli_guard/user_service.rb +305 -0
  51. data/app/views/lesli_guard/accounts/_account.html.erb +2 -0
  52. data/app/views/lesli_guard/accounts/_form.html.erb +17 -0
  53. data/app/views/lesli_guard/accounts/edit.html.erb +10 -0
  54. data/app/views/lesli_guard/accounts/index.html.erb +14 -0
  55. data/app/views/lesli_guard/accounts/new.html.erb +9 -0
  56. data/app/views/lesli_guard/accounts/show.html.erb +10 -0
  57. data/app/views/lesli_guard/dashboards/show.html.erb +1 -0
  58. data/app/views/lesli_guard/descriptor/activities/_form.html.erb +32 -0
  59. data/app/views/lesli_guard/descriptor/activities/edit.html.erb +34 -0
  60. data/app/views/lesli_guard/descriptor/activities/index.html.erb +34 -0
  61. data/app/views/lesli_guard/descriptor/activities/new.html.erb +34 -0
  62. data/app/views/lesli_guard/descriptor/activities/show.html.erb +34 -0
  63. data/app/views/lesli_guard/descriptor/privileges/_form.html.erb +32 -0
  64. data/app/views/lesli_guard/descriptor/privileges/edit.html.erb +34 -0
  65. data/app/views/lesli_guard/descriptor/privileges/index.html.erb +34 -0
  66. data/app/views/lesli_guard/descriptor/privileges/new.html.erb +34 -0
  67. data/app/views/lesli_guard/descriptor/privileges/show.html.erb +34 -0
  68. data/app/views/lesli_guard/descriptors/_form.html.erb +32 -0
  69. data/app/views/lesli_guard/descriptors/edit.html.erb +34 -0
  70. data/app/views/lesli_guard/descriptors/index.html.erb +34 -0
  71. data/app/views/lesli_guard/descriptors/new.html.erb +34 -0
  72. data/app/views/lesli_guard/descriptors/show.html.erb +34 -0
  73. data/app/views/lesli_guard/partials/_engine-navigation.html.erb +38 -0
  74. data/app/views/lesli_guard/role/activities/_form.html.erb +32 -0
  75. data/app/views/lesli_guard/role/activities/edit.html.erb +34 -0
  76. data/app/views/lesli_guard/role/activities/index.html.erb +34 -0
  77. data/app/views/lesli_guard/role/activities/new.html.erb +34 -0
  78. data/app/views/lesli_guard/role/activities/show.html.erb +34 -0
  79. data/app/views/lesli_guard/role/descriptors/_form.html.erb +32 -0
  80. data/app/views/lesli_guard/role/descriptors/edit.html.erb +34 -0
  81. data/app/views/lesli_guard/role/descriptors/index.html.erb +34 -0
  82. data/app/views/lesli_guard/role/descriptors/new.html.erb +34 -0
  83. data/app/views/lesli_guard/role/descriptors/show.html.erb +34 -0
  84. data/app/views/lesli_guard/role/privileges/_form.html.erb +32 -0
  85. data/app/views/lesli_guard/role/privileges/edit.html.erb +34 -0
  86. data/app/views/lesli_guard/role/privileges/index.html.erb +34 -0
  87. data/app/views/lesli_guard/role/privileges/new.html.erb +34 -0
  88. data/app/views/lesli_guard/role/privileges/show.html.erb +34 -0
  89. data/app/views/lesli_guard/roles/edit.html.erb +34 -0
  90. data/app/views/lesli_guard/roles/index.html.erb +34 -0
  91. data/app/views/lesli_guard/roles/new.html.erb +34 -0
  92. data/app/views/lesli_guard/roles/show.html.erb +34 -0
  93. data/app/views/lesli_guard/users/edit.html.erb +10 -0
  94. data/app/views/lesli_guard/users/index.html.erb +34 -0
  95. data/app/views/lesli_guard/users/new.html.erb +34 -0
  96. data/app/views/lesli_guard/users/show.html.erb +1 -0
  97. data/config/locales/translations.en.yml +43 -0
  98. data/config/locales/translations.es.yml +43 -0
  99. data/config/routes.rb +90 -0
  100. data/db/migrate/v1/0801000110_create_lesli_guard_accounts.rb +42 -0
  101. data/db/migrate/v1/0801050110_create_lesli_guard_dashboards.rb +51 -0
  102. data/db/migrate/v1/0801050210_create_lesli_guard_dashboard_components.rb +53 -0
  103. data/lib/lesli_guard/engine.rb +18 -0
  104. data/lib/lesli_guard/version.rb +4 -0
  105. data/lib/lesli_guard.rb +6 -0
  106. data/lib/tasks/lesli_guard_tasks.rake +50 -0
  107. data/lib/vue/application.js +112 -0
  108. data/lib/vue/apps/descriptors/components/form.vue +136 -0
  109. data/lib/vue/apps/descriptors/edit.vue +83 -0
  110. data/lib/vue/apps/descriptors/index.vue +113 -0
  111. data/lib/vue/apps/descriptors/new.vue +69 -0
  112. data/lib/vue/apps/descriptors/show.vue +233 -0
  113. data/lib/vue/apps/roles/components/descriptors.vue +81 -0
  114. data/lib/vue/apps/roles/components/form.vue +253 -0
  115. data/lib/vue/apps/roles/components/privilegeCustom.vue +86 -0
  116. data/lib/vue/apps/roles/components/privilegeStandard.vue +196 -0
  117. data/lib/vue/apps/roles/edit.vue +118 -0
  118. data/lib/vue/apps/roles/index.vue +168 -0
  119. data/lib/vue/apps/roles/logs.vue +110 -0
  120. data/lib/vue/apps/roles/new.vue +86 -0
  121. data/lib/vue/apps/roles/show.vue +109 -0
  122. data/lib/vue/apps/users/components/information-card.vue +107 -0
  123. data/lib/vue/apps/users/components/information-form.vue +176 -0
  124. data/lib/vue/apps/users/components/integrations-information.vue +61 -0
  125. data/lib/vue/apps/users/components/management-roles.vue +107 -0
  126. data/lib/vue/apps/users/components/management-security.vue +113 -0
  127. data/lib/vue/apps/users/components/management-sessions.vue +101 -0
  128. data/lib/vue/apps/users/components/management-settings.vue +93 -0
  129. data/lib/vue/apps/users/index.vue +207 -0
  130. data/lib/vue/apps/users/new.vue +181 -0
  131. data/lib/vue/apps/users/show.vue +131 -0
  132. data/lib/vue/stores/descriptor.js +117 -0
  133. data/lib/vue/stores/descriptors.js +156 -0
  134. data/lib/vue/stores/role.js +203 -0
  135. data/lib/vue/stores/roles.js +58 -0
  136. data/lib/vue/stores/translations.json +98 -0
  137. data/lib/vue/stores/user.js +331 -0
  138. data/lib/vue/stores/users.js +176 -0
  139. data/license +674 -0
  140. data/readme.md +76 -0
  141. metadata +199 -0
data/readme.md ADDED
@@ -0,0 +1,76 @@
1
+ <p align="center">
2
+ <img width="90" alt="LesliGuard logo" src="./app/assets/images/lesli_guard/vault-logo.svg" />
3
+ <h3 align="center">Security Management Module for the Lesli Framework.</h3>
4
+ </p>
5
+
6
+ <hr/>
7
+ <p align="center">
8
+ <a target="blank" href="https://rubygems.org/gems/lesli_guard">
9
+ <img src="https://badge.fury.io/rb/lesli_guard.svg" alt="Gem Version" height="24">
10
+ </a>
11
+ </p>
12
+ <hr/>
13
+
14
+ <div align="center">
15
+ <img
16
+ style="width:100%;max-width:800px;border-radius:6px;"
17
+ alt="Engine screenshot" src="./docs/images/screenshot.png" />
18
+ </div>
19
+
20
+ ### Quick start
21
+
22
+ ```shell
23
+ # Add LesliGuard engine
24
+ bundle add lesli_guard
25
+ ```
26
+
27
+ ```shell
28
+ # Setup database
29
+ rake lesli:db:setup
30
+ ```
31
+
32
+ ```ruby
33
+ # Load LesliGuard
34
+ Rails.application.routes.draw do
35
+ mount LesliGuard::Engine => "/guard"
36
+ end
37
+ ```
38
+
39
+
40
+ ### Documentation
41
+ * [database](./docs/database.md)
42
+ * [documentation](https://www.lesli.dev/documentation/)
43
+
44
+
45
+ ### Get in touch
46
+
47
+ * [Website: https://www.lesli.tech](https://www.lesli.tech)
48
+ * [Email: hello@lesli.tech](hello@lesli.tech)
49
+ * [Twitter: @LesliTech](https://twitter.com/LesliTech)
50
+
51
+
52
+ ### License
53
+ -------
54
+ Copyright (c) 2023, Lesli Technologies, S. A.
55
+
56
+ This program is free software: you can redistribute it and/or modify
57
+ it under the terms of the GNU General Public License as published by
58
+ the Free Software Foundation, either version 3 of the License, or
59
+ (at your option) any later version.
60
+
61
+ This program is distributed in the hope that it will be useful,
62
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
63
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64
+ GNU General Public License for more details.
65
+
66
+ You should have received a copy of the GNU General Public License
67
+ along with this program. If not, see http://www.gnu.org/licenses/.
68
+
69
+ <hr />
70
+ <br />
71
+
72
+ <p align="center">
73
+ <img width="200" alt="Lesli logo" src="https://cdn.lesli.tech/lesli/brand/app-logo.svg" />
74
+ <h4 align="center">Ruby on Rails SaaS Development Framework.</h4>
75
+ </p>
76
+
metadata ADDED
@@ -0,0 +1,199 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: lesli_guard
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - The Lesli Development Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-02-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '7'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '7'
27
+ description: Security Management Module for the Lesli Framework.
28
+ email:
29
+ - hello@lesli.tech
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - Rakefile
35
+ - app/assets/config/lesli_guard_manifest.js
36
+ - app/assets/images/lesli_guard/guard-logo.svg
37
+ - app/assets/javascripts/lesli_guard/application.js
38
+ - app/assets/stylesheets/lesli_guard/application.scss
39
+ - app/assets/stylesheets/lesli_guard/dashboards.scss
40
+ - app/assets/stylesheets/lesli_guard/descriptors.scss
41
+ - app/assets/stylesheets/lesli_guard/roles.scss
42
+ - app/assets/stylesheets/lesli_guard/system_controller.scss
43
+ - app/assets/stylesheets/lesli_guard/users.scss
44
+ - app/controllers/lesli_guard/accounts_controller.rb
45
+ - app/controllers/lesli_guard/application_controller.rb
46
+ - app/controllers/lesli_guard/dashboard/components_controller.rb
47
+ - app/controllers/lesli_guard/dashboards_controller.rb
48
+ - app/controllers/lesli_guard/descriptor/activities_controller.rb
49
+ - app/controllers/lesli_guard/descriptor/privileges_controller.rb
50
+ - app/controllers/lesli_guard/descriptors_controller.rb
51
+ - app/controllers/lesli_guard/role/activities_controller.rb
52
+ - app/controllers/lesli_guard/role/descriptors_controller.rb
53
+ - app/controllers/lesli_guard/role/privileges_controller.rb
54
+ - app/controllers/lesli_guard/roles_controller.rb
55
+ - app/controllers/lesli_guard/user/roles_controller.rb
56
+ - app/controllers/lesli_guard/user/sessions_controller.rb
57
+ - app/controllers/lesli_guard/users_controller.rb
58
+ - app/helpers/lesli_guard/accounts_helper.rb
59
+ - app/helpers/lesli_guard/application_helper.rb
60
+ - app/helpers/lesli_guard/dashboards_helper.rb
61
+ - app/helpers/lesli_guard/descriptor/activities_helper.rb
62
+ - app/helpers/lesli_guard/descriptor/privileges_helper.rb
63
+ - app/helpers/lesli_guard/descriptors_helper.rb
64
+ - app/helpers/lesli_guard/role/activities_helper.rb
65
+ - app/helpers/lesli_guard/role/descriptors_helper.rb
66
+ - app/helpers/lesli_guard/role/privileges_helper.rb
67
+ - app/helpers/lesli_guard/roles_helper.rb
68
+ - app/jobs/lesli_guard/application_job.rb
69
+ - app/mailers/lesli_guard/application_mailer.rb
70
+ - app/models/lesli_guard/account.rb
71
+ - app/models/lesli_guard/application_record.rb
72
+ - app/models/lesli_guard/dashboard.rb
73
+ - app/models/lesli_guard/dashboard/component.rb
74
+ - app/models/lesli_guard/descriptor.rb
75
+ - app/models/lesli_guard/descriptor/activity.rb
76
+ - app/models/lesli_guard/descriptor/privilege.rb
77
+ - app/models/lesli_guard/role/activity.rb
78
+ - app/services/lesli_guard/descriptor_privilege_service.rb
79
+ - app/services/lesli_guard/descriptor_service.rb
80
+ - app/services/lesli_guard/role_descriptor_service.rb
81
+ - app/services/lesli_guard/role_service.rb
82
+ - app/services/lesli_guard/user_service.rb
83
+ - app/views/lesli_guard/accounts/_account.html.erb
84
+ - app/views/lesli_guard/accounts/_form.html.erb
85
+ - app/views/lesli_guard/accounts/edit.html.erb
86
+ - app/views/lesli_guard/accounts/index.html.erb
87
+ - app/views/lesli_guard/accounts/new.html.erb
88
+ - app/views/lesli_guard/accounts/show.html.erb
89
+ - app/views/lesli_guard/dashboards/show.html.erb
90
+ - app/views/lesli_guard/descriptor/activities/_form.html.erb
91
+ - app/views/lesli_guard/descriptor/activities/edit.html.erb
92
+ - app/views/lesli_guard/descriptor/activities/index.html.erb
93
+ - app/views/lesli_guard/descriptor/activities/new.html.erb
94
+ - app/views/lesli_guard/descriptor/activities/show.html.erb
95
+ - app/views/lesli_guard/descriptor/privileges/_form.html.erb
96
+ - app/views/lesli_guard/descriptor/privileges/edit.html.erb
97
+ - app/views/lesli_guard/descriptor/privileges/index.html.erb
98
+ - app/views/lesli_guard/descriptor/privileges/new.html.erb
99
+ - app/views/lesli_guard/descriptor/privileges/show.html.erb
100
+ - app/views/lesli_guard/descriptors/_form.html.erb
101
+ - app/views/lesli_guard/descriptors/edit.html.erb
102
+ - app/views/lesli_guard/descriptors/index.html.erb
103
+ - app/views/lesli_guard/descriptors/new.html.erb
104
+ - app/views/lesli_guard/descriptors/show.html.erb
105
+ - app/views/lesli_guard/partials/_engine-navigation.html.erb
106
+ - app/views/lesli_guard/role/activities/_form.html.erb
107
+ - app/views/lesli_guard/role/activities/edit.html.erb
108
+ - app/views/lesli_guard/role/activities/index.html.erb
109
+ - app/views/lesli_guard/role/activities/new.html.erb
110
+ - app/views/lesli_guard/role/activities/show.html.erb
111
+ - app/views/lesli_guard/role/descriptors/_form.html.erb
112
+ - app/views/lesli_guard/role/descriptors/edit.html.erb
113
+ - app/views/lesli_guard/role/descriptors/index.html.erb
114
+ - app/views/lesli_guard/role/descriptors/new.html.erb
115
+ - app/views/lesli_guard/role/descriptors/show.html.erb
116
+ - app/views/lesli_guard/role/privileges/_form.html.erb
117
+ - app/views/lesli_guard/role/privileges/edit.html.erb
118
+ - app/views/lesli_guard/role/privileges/index.html.erb
119
+ - app/views/lesli_guard/role/privileges/new.html.erb
120
+ - app/views/lesli_guard/role/privileges/show.html.erb
121
+ - app/views/lesli_guard/roles/edit.html.erb
122
+ - app/views/lesli_guard/roles/index.html.erb
123
+ - app/views/lesli_guard/roles/new.html.erb
124
+ - app/views/lesli_guard/roles/show.html.erb
125
+ - app/views/lesli_guard/users/edit.html.erb
126
+ - app/views/lesli_guard/users/index.html.erb
127
+ - app/views/lesli_guard/users/new.html.erb
128
+ - app/views/lesli_guard/users/show.html.erb
129
+ - config/locales/translations.en.yml
130
+ - config/locales/translations.es.yml
131
+ - config/routes.rb
132
+ - db/migrate/v1/0801000110_create_lesli_guard_accounts.rb
133
+ - db/migrate/v1/0801050110_create_lesli_guard_dashboards.rb
134
+ - db/migrate/v1/0801050210_create_lesli_guard_dashboard_components.rb
135
+ - lib/lesli_guard.rb
136
+ - lib/lesli_guard/engine.rb
137
+ - lib/lesli_guard/version.rb
138
+ - lib/tasks/lesli_guard_tasks.rake
139
+ - lib/vue/application.js
140
+ - lib/vue/apps/descriptors/components/form.vue
141
+ - lib/vue/apps/descriptors/edit.vue
142
+ - lib/vue/apps/descriptors/index.vue
143
+ - lib/vue/apps/descriptors/new.vue
144
+ - lib/vue/apps/descriptors/show.vue
145
+ - lib/vue/apps/roles/components/descriptors.vue
146
+ - lib/vue/apps/roles/components/form.vue
147
+ - lib/vue/apps/roles/components/privilegeCustom.vue
148
+ - lib/vue/apps/roles/components/privilegeStandard.vue
149
+ - lib/vue/apps/roles/edit.vue
150
+ - lib/vue/apps/roles/index.vue
151
+ - lib/vue/apps/roles/logs.vue
152
+ - lib/vue/apps/roles/new.vue
153
+ - lib/vue/apps/roles/show.vue
154
+ - lib/vue/apps/users/components/information-card.vue
155
+ - lib/vue/apps/users/components/information-form.vue
156
+ - lib/vue/apps/users/components/integrations-information.vue
157
+ - lib/vue/apps/users/components/management-roles.vue
158
+ - lib/vue/apps/users/components/management-security.vue
159
+ - lib/vue/apps/users/components/management-sessions.vue
160
+ - lib/vue/apps/users/components/management-settings.vue
161
+ - lib/vue/apps/users/index.vue
162
+ - lib/vue/apps/users/new.vue
163
+ - lib/vue/apps/users/show.vue
164
+ - lib/vue/stores/descriptor.js
165
+ - lib/vue/stores/descriptors.js
166
+ - lib/vue/stores/role.js
167
+ - lib/vue/stores/roles.js
168
+ - lib/vue/stores/translations.json
169
+ - lib/vue/stores/user.js
170
+ - lib/vue/stores/users.js
171
+ - license
172
+ - readme.md
173
+ homepage: https://www.lesli.dev/
174
+ licenses:
175
+ - GPL-3.0
176
+ metadata:
177
+ homepage_uri: https://www.lesli.dev/
178
+ changelog_uri: https://github.com/LesliTech/LesliGuard
179
+ source_code_uri: https://github.com/LesliTech/LesliGuard
180
+ post_install_message:
181
+ rdoc_options: []
182
+ require_paths:
183
+ - lib
184
+ required_ruby_version: !ruby/object:Gem::Requirement
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: 2.7.2
189
+ required_rubygems_version: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ version: '0'
194
+ requirements: []
195
+ rubygems_version: 3.3.7
196
+ signing_key:
197
+ specification_version: 4
198
+ summary: Security Management Module for the Lesli Framework.
199
+ test_files: []