lesli_security 0.3.0

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 (153) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +38 -0
  3. data/app/assets/config/lesli_security_manifest.js +38 -0
  4. data/app/assets/images/lesli_security/security-logo.svg +57 -0
  5. data/app/assets/javascripts/lesli_security/application.js +5583 -0
  6. data/app/assets/stylesheets/lesli_security/application.css +95 -0
  7. data/app/controllers/lesli_security/accounts_controller.rb +60 -0
  8. data/app/controllers/lesli_security/application_controller.rb +37 -0
  9. data/app/controllers/lesli_security/dashboard/components_controller.rb +60 -0
  10. data/app/controllers/lesli_security/dashboards_controller.rb +36 -0
  11. data/app/controllers/lesli_security/descriptor/activities_controller.rb +122 -0
  12. data/app/controllers/lesli_security/descriptor/privileges_controller.rb +112 -0
  13. data/app/controllers/lesli_security/descriptors_controller.rb +129 -0
  14. data/app/controllers/lesli_security/role/activities_controller.rb +76 -0
  15. data/app/controllers/lesli_security/role/descriptors_controller.rb +97 -0
  16. data/app/controllers/lesli_security/role/privileges_controller.rb +47 -0
  17. data/app/controllers/lesli_security/roles_controller.rb +185 -0
  18. data/app/controllers/lesli_security/user/roles_controller.rb +98 -0
  19. data/app/controllers/lesli_security/user/sessions_controller.rb +71 -0
  20. data/app/controllers/lesli_security/users_controller.rb +206 -0
  21. data/app/helpers/lesli_security/accounts_helper.rb +4 -0
  22. data/app/helpers/lesli_security/application_helper.rb +4 -0
  23. data/app/helpers/lesli_security/dashboards_helper.rb +4 -0
  24. data/app/helpers/lesli_security/descriptor/activities_helper.rb +4 -0
  25. data/app/helpers/lesli_security/descriptor/privileges_helper.rb +4 -0
  26. data/app/helpers/lesli_security/descriptors_helper.rb +4 -0
  27. data/app/helpers/lesli_security/role/activities_helper.rb +4 -0
  28. data/app/helpers/lesli_security/role/descriptors_helper.rb +4 -0
  29. data/app/helpers/lesli_security/role/privileges_helper.rb +4 -0
  30. data/app/helpers/lesli_security/roles_helper.rb +4 -0
  31. data/app/jobs/lesli_security/application_job.rb +37 -0
  32. data/app/mailers/lesli_security/application_mailer.rb +39 -0
  33. data/app/models/lesli_security/account.rb +43 -0
  34. data/app/models/lesli_security/application_record.rb +37 -0
  35. data/app/models/lesli_security/dashboard/component.rb +42 -0
  36. data/app/models/lesli_security/dashboard.rb +58 -0
  37. data/app/models/lesli_security/descriptor/activity.rb +40 -0
  38. data/app/models/lesli_security/descriptor/privilege.rb +40 -0
  39. data/app/models/lesli_security/descriptor.rb +41 -0
  40. data/app/models/lesli_security/role/activity.rb +40 -0
  41. data/app/services/lesli_security/descriptor_privilege_service.rb +74 -0
  42. data/app/services/lesli_security/descriptor_service.rb +152 -0
  43. data/app/services/lesli_security/role_descriptor_service.rb +61 -0
  44. data/app/services/lesli_security/role_service.rb +215 -0
  45. data/app/services/lesli_security/user_service.rb +305 -0
  46. data/app/views/lesli_security/accounts/_account.html.erb +2 -0
  47. data/app/views/lesli_security/accounts/_form.html.erb +17 -0
  48. data/app/views/lesli_security/accounts/edit.html.erb +10 -0
  49. data/app/views/lesli_security/accounts/index.html.erb +14 -0
  50. data/app/views/lesli_security/accounts/new.html.erb +9 -0
  51. data/app/views/lesli_security/accounts/show.html.erb +10 -0
  52. data/app/views/lesli_security/dashboards/show.html.erb +1 -0
  53. data/app/views/lesli_security/descriptor/activities/_form.html.erb +32 -0
  54. data/app/views/lesli_security/descriptor/activities/edit.html.erb +34 -0
  55. data/app/views/lesli_security/descriptor/activities/index.html.erb +34 -0
  56. data/app/views/lesli_security/descriptor/activities/new.html.erb +34 -0
  57. data/app/views/lesli_security/descriptor/activities/show.html.erb +34 -0
  58. data/app/views/lesli_security/descriptor/privileges/_form.html.erb +32 -0
  59. data/app/views/lesli_security/descriptor/privileges/edit.html.erb +34 -0
  60. data/app/views/lesli_security/descriptor/privileges/index.html.erb +34 -0
  61. data/app/views/lesli_security/descriptor/privileges/new.html.erb +34 -0
  62. data/app/views/lesli_security/descriptor/privileges/show.html.erb +34 -0
  63. data/app/views/lesli_security/descriptors/_form.html.erb +32 -0
  64. data/app/views/lesli_security/descriptors/edit.html.erb +34 -0
  65. data/app/views/lesli_security/descriptors/index.html.erb +34 -0
  66. data/app/views/lesli_security/descriptors/new.html.erb +34 -0
  67. data/app/views/lesli_security/descriptors/show.html.erb +34 -0
  68. data/app/views/lesli_security/partials/_engine-navigation.html.erb +38 -0
  69. data/app/views/lesli_security/role/activities/_form.html.erb +32 -0
  70. data/app/views/lesli_security/role/activities/edit.html.erb +34 -0
  71. data/app/views/lesli_security/role/activities/index.html.erb +34 -0
  72. data/app/views/lesli_security/role/activities/new.html.erb +34 -0
  73. data/app/views/lesli_security/role/activities/show.html.erb +34 -0
  74. data/app/views/lesli_security/role/descriptors/_form.html.erb +32 -0
  75. data/app/views/lesli_security/role/descriptors/edit.html.erb +34 -0
  76. data/app/views/lesli_security/role/descriptors/index.html.erb +34 -0
  77. data/app/views/lesli_security/role/descriptors/new.html.erb +34 -0
  78. data/app/views/lesli_security/role/descriptors/show.html.erb +34 -0
  79. data/app/views/lesli_security/role/privileges/_form.html.erb +32 -0
  80. data/app/views/lesli_security/role/privileges/edit.html.erb +34 -0
  81. data/app/views/lesli_security/role/privileges/index.html.erb +34 -0
  82. data/app/views/lesli_security/role/privileges/new.html.erb +34 -0
  83. data/app/views/lesli_security/role/privileges/show.html.erb +34 -0
  84. data/app/views/lesli_security/roles/edit.html.erb +34 -0
  85. data/app/views/lesli_security/roles/index.html.erb +34 -0
  86. data/app/views/lesli_security/roles/new.html.erb +34 -0
  87. data/app/views/lesli_security/roles/show.html.erb +34 -0
  88. data/app/views/lesli_security/users/edit.html.erb +10 -0
  89. data/app/views/lesli_security/users/index.html.erb +34 -0
  90. data/app/views/lesli_security/users/new.html.erb +34 -0
  91. data/app/views/lesli_security/users/show.html.erb +1 -0
  92. data/config/locales/translations.en.yml +44 -0
  93. data/config/locales/translations.es.yml +44 -0
  94. data/config/locales/translations.fr.yml +44 -0
  95. data/config/locales/translations.it.yml +44 -0
  96. data/config/locales/translations.pt.yml +44 -0
  97. data/config/routes.rb +90 -0
  98. data/db/migrate/v1/0010000210_create_lesli_roles.rb +60 -0
  99. data/db/migrate/v1/0010000310_create_lesli_users.rb +97 -0
  100. data/db/migrate/v1/0010003010_create_lesli_user_details.rb +49 -0
  101. data/db/migrate/v1/0010003110_create_lesli_user_settings.rb +44 -0
  102. data/db/migrate/v1/0010003210_create_lesli_user_sessions.rb +55 -0
  103. data/db/migrate/v1/0010003410_create_lesli_user_powers.rb +43 -0
  104. data/db/migrate/v1/0010004010_create_lesli_user_logs.rb +45 -0
  105. data/db/migrate/v1/0010005010_create_lesli_descriptors.rb +44 -0
  106. data/db/migrate/v1/0010005110_create_lesli_descriptor_privileges.rb +45 -0
  107. data/db/migrate/v1/0010005210_create_lesli_descriptor_activities.rb +49 -0
  108. data/db/migrate/v1/0010005510_create_lesli_role_powers.rb +51 -0
  109. data/db/migrate/v1/0010005710_create_lesli_role_privileges.rb +45 -0
  110. data/db/migrate/v1/0802000110_create_lesli_security_accounts.rb +42 -0
  111. data/db/migrate/v1/0802050110_create_lesli_security_dashboards.rb +51 -0
  112. data/db/migrate/v1/0802050210_create_lesli_security_dashboard_components.rb +53 -0
  113. data/lib/lesli_security/engine.rb +18 -0
  114. data/lib/lesli_security/version.rb +4 -0
  115. data/lib/lesli_security.rb +6 -0
  116. data/lib/scss/application.scss +38 -0
  117. data/lib/scss/users.scss +67 -0
  118. data/lib/tasks/lesli_security_tasks.rake +50 -0
  119. data/lib/vue/application.js +112 -0
  120. data/lib/vue/apps/descriptors/components/form.vue +136 -0
  121. data/lib/vue/apps/descriptors/edit.vue +83 -0
  122. data/lib/vue/apps/descriptors/index.vue +113 -0
  123. data/lib/vue/apps/descriptors/new.vue +69 -0
  124. data/lib/vue/apps/descriptors/show.vue +233 -0
  125. data/lib/vue/apps/roles/components/descriptors.vue +81 -0
  126. data/lib/vue/apps/roles/components/form.vue +253 -0
  127. data/lib/vue/apps/roles/components/privilegeCustom.vue +86 -0
  128. data/lib/vue/apps/roles/components/privilegeStandard.vue +196 -0
  129. data/lib/vue/apps/roles/edit.vue +118 -0
  130. data/lib/vue/apps/roles/index.vue +168 -0
  131. data/lib/vue/apps/roles/logs.vue +110 -0
  132. data/lib/vue/apps/roles/new.vue +86 -0
  133. data/lib/vue/apps/roles/show.vue +109 -0
  134. data/lib/vue/apps/users/components/information-card.vue +104 -0
  135. data/lib/vue/apps/users/components/information-form.vue +176 -0
  136. data/lib/vue/apps/users/components/integrations-information.vue +61 -0
  137. data/lib/vue/apps/users/components/management-roles.vue +107 -0
  138. data/lib/vue/apps/users/components/management-security.vue +113 -0
  139. data/lib/vue/apps/users/components/management-sessions.vue +101 -0
  140. data/lib/vue/apps/users/components/management-settings.vue +93 -0
  141. data/lib/vue/apps/users/index.vue +207 -0
  142. data/lib/vue/apps/users/new.vue +181 -0
  143. data/lib/vue/apps/users/show.vue +131 -0
  144. data/lib/vue/stores/descriptor.js +117 -0
  145. data/lib/vue/stores/descriptors.js +156 -0
  146. data/lib/vue/stores/role.js +203 -0
  147. data/lib/vue/stores/roles.js +58 -0
  148. data/lib/vue/stores/translations.json +277 -0
  149. data/lib/vue/stores/user.js +331 -0
  150. data/lib/vue/stores/users.js +166 -0
  151. data/license +674 -0
  152. data/readme.md +76 -0
  153. metadata +225 -0
@@ -0,0 +1,156 @@
1
+ /*
2
+ Lesli
3
+
4
+ Copyright (c) 2023, Lesli Technologies, S. A.
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with this program. If not, see http://www.gnu.org/licenses/.
18
+
19
+ Lesli · Ruby on Rails SaaS Development Framework.
20
+
21
+ Made with ♥ by https://www.lesli.tech
22
+ Building a better future, one line of code at a time.
23
+
24
+ @contact hello@lesli.tech
25
+ @website https://www.lesli.tech
26
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
+
28
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
+ // ·
30
+ */
31
+
32
+
33
+ // ·
34
+ import { defineStore } from "pinia"
35
+
36
+
37
+ // ·
38
+ export const useDescriptors = defineStore("guard.descriptors", {
39
+ state: () => {
40
+ return {
41
+ list: [],
42
+ descriptor: {},
43
+ index: {
44
+ loading: false,
45
+ pagination: {},
46
+ records: []
47
+ }
48
+ }
49
+ },
50
+ actions: {
51
+
52
+ fetchDescriptors() {
53
+ if (this.index.records.length > 0) {
54
+ return
55
+ }
56
+
57
+ this.getDescriptors()
58
+ },
59
+
60
+ getDescriptors() {
61
+ this.index.loading = true
62
+ this.http.get(this.url.security("descriptors")).then(result => {
63
+ this.index.pagination = result.pagination
64
+ this.index.records = result.records
65
+ }).catch(error => {
66
+ this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
67
+ }).finally(() => {
68
+ this.index.loading = false
69
+ })
70
+ },
71
+
72
+ resetDescriptor() {
73
+ this.descriptor = {}
74
+ this.privileges = []
75
+ },
76
+
77
+ paginateIndex(page) {
78
+ console.log("store page: ", page)
79
+ this.index.pagination.page = page
80
+ //this.fetch(this.url.admin("descriptors").paginate(this.pagination.page))
81
+ },
82
+
83
+ /*
84
+ fetchDescriptorList() {
85
+ this.http.get(this.url.admin("descriptors/list")).then(result => {
86
+ this.list = result.map(descriptor => {
87
+ descriptor.active = false
88
+ return descriptor
89
+ })
90
+ })
91
+ },
92
+
93
+ /**
94
+ * @description This action is used to reset descriptor object
95
+ * /
96
+
97
+
98
+ /**
99
+ * @description This action is used to create a descriptor
100
+ * /
101
+
102
+
103
+ /**
104
+ * @description This action is used to update a descriptor
105
+ * /
106
+ updateDescriptor(){
107
+ this.loading = true
108
+ this.http.put(this.url.admin("descriptors/:id", this.descriptor.id), { descriptor: this.descriptor }).then(result => {
109
+ this.msg.success(I18n.t("core.users.messages_success_operation"))
110
+ this.loading = false
111
+ }).catch(error => {
112
+ this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
113
+ })
114
+
115
+ },
116
+ /**
117
+ * @description This action is used to sort the results
118
+ * /
119
+ sortIndex(column, direction) {
120
+ this.fetch(this.url.admin("descriptors").order(column, direction))
121
+ },
122
+ /**
123
+ * @description This action is used to search
124
+ * @param {string} search_string
125
+ * /
126
+ search(search_string) {
127
+ this.fetch(this.url.admin("descriptors").search(search_string))
128
+ },
129
+ /**
130
+ * @description This action is used to paginate index
131
+ * @param {string} page actual page
132
+ * /
133
+ paginateIndex(page) {
134
+ this.pagination.page = page
135
+ this.fetch(this.url.admin("descriptors").paginate(this.pagination.page))
136
+ },
137
+ /**
138
+ * @description This action is used to get descriptors as options
139
+ * /
140
+ getDescriptorsOptions(){
141
+ this.loading = true
142
+ this.descriptors_options = []
143
+ this.http.get(this.url.admin("descriptors/list")).then(result => {
144
+ result.forEach((descriptor)=>{
145
+ this.descriptors_options.push({
146
+ label: descriptor.name,
147
+ value: descriptor.id
148
+ })
149
+ })
150
+
151
+ this.loading = false
152
+ })
153
+ },
154
+ */
155
+ }
156
+ })
@@ -0,0 +1,203 @@
1
+ /*
2
+ Lesli
3
+
4
+ Copyright (c) 2023, Lesli Technologies, S. A.
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with this program. If not, see http://www.gnu.org/licenses/.
18
+
19
+ Lesli · Ruby on Rails Development Platform.
20
+
21
+ Made with ♥ by https://www.lesli.tech
22
+ Building a better future, one line of code at a time.
23
+
24
+ @contact hello@lesli.tech
25
+ @website https://www.lesli.tech
26
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
+
28
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
+ // ·
30
+ */
31
+
32
+
33
+ // ·
34
+ import { defineStore } from "pinia"
35
+ import { useRouter } from "vue-router"
36
+
37
+
38
+ // · initialize/inject plugins
39
+ const router = useRouter()
40
+
41
+
42
+ // ·
43
+ export const useRole = defineStore("guard.role", {
44
+ state: () => {
45
+ return {
46
+ loading: false,
47
+ router: useRouter(),
48
+ role: {
49
+ name: ""
50
+ },
51
+
52
+ options: {},
53
+ descriptors: [],
54
+ descriptorsCustom: [],
55
+ descriptorSearchString: '',
56
+
57
+ privileges: [],
58
+ }
59
+ },
60
+ actions: {
61
+
62
+ getRole(id) {
63
+ this.loading = true
64
+ this.http.get(this.url.security("roles/:id", id)).then(result => {
65
+ this.role = result
66
+ this.getDescriptors()
67
+ this.loading = false
68
+ })
69
+ },
70
+
71
+ postRole() {
72
+ this.role.loading = true
73
+ this.http.post(this.url.security("roles"), this.role).then(result => {
74
+ //msg.success(translations.core.roles.messages_success_role_created_successfully)
75
+ this.router.push(this.url.security("roles/:id/edit", result.id).s)
76
+ }).catch(error => {
77
+ console.log(error)
78
+ }).finally(() => {
79
+ this.role.loading = false
80
+ })
81
+ },
82
+
83
+ putRole() {
84
+ this.role.loading = true
85
+ this.http.put(this.url.admin("roles/:id", this.role.id), this.role).then(result => {
86
+ this.msg.success(I18n.t('core.roles.messages_success_role_successfully_updated'))
87
+ }).finally(() => {
88
+ this.role.loading = false
89
+ })
90
+ },
91
+
92
+ searchDescriptors(string) {
93
+ this.descriptorSearchString = string
94
+ this.getDescriptors()
95
+ },
96
+
97
+ getDescriptors() {
98
+
99
+ let url = this.url.security("roles/:id/descriptors", this.role.id)
100
+
101
+ if (this.descriptorSearchString != '') {
102
+ url = url.search(this.descriptorSearchString)
103
+ }
104
+
105
+ this.http.get(url).then(descriptors => {
106
+ this.descriptors = descriptors
107
+ })
108
+ },
109
+
110
+ postDescriptor(descriptor) {
111
+ this.http.post(this.url.security("roles/:id/descriptors", this.role.id), {
112
+ role_descriptor: {
113
+ id: descriptor.id
114
+ }
115
+ })
116
+ },
117
+
118
+ deleteDescriptor(descriptor) {
119
+
120
+ this.http.delete(this.url.security("roles/:id/descriptors/:descriptor_id", {
121
+ id: this.role.id,
122
+ descriptor_id: descriptor.id
123
+ })).then(result => {
124
+ console.log(result)
125
+ }).catch(error => {
126
+ console.log(error)
127
+ })
128
+ },
129
+
130
+ getPrivileges() {
131
+
132
+ let url = this.url.security("roles/:id/privileges", this.role.id)
133
+
134
+ this.http.get(url).then(descriptors => {
135
+ this.privileges = descriptors
136
+ }).catch(error => {
137
+ console.log(error)
138
+ })
139
+ },
140
+ updatePrivilege(descriptor) {
141
+ this.http.put(this.url.security("roles/:id/descriptors/:descriptor_id", {
142
+ id: this.role.id,
143
+ descriptor_id: descriptor.id
144
+ }), {
145
+ role_descriptor: {
146
+ id: descriptor.id,
147
+ plist: descriptor.plist,
148
+ pindex: descriptor.pindex,
149
+ pshow: descriptor.pshow,
150
+ pcreate: descriptor.pcreate,
151
+ pupdate: descriptor.pupdate,
152
+ pdestroy: descriptor.pdestroy,
153
+ }
154
+ })
155
+ },
156
+
157
+ getOptions() {
158
+ this.http.get(this.url.security("roles/options")).then(result => {
159
+ this.options = result
160
+ })
161
+ },
162
+ /**
163
+ * @description This action is used to sort the results
164
+ */
165
+ sortIndex(column, direction) {
166
+ this.order.column = column
167
+ this.order.direction = direction
168
+ this.fetch()
169
+ },
170
+ /**
171
+ * @description This action is used to search
172
+ * @param {string} search_string
173
+ */
174
+ search(search_string) {
175
+ this.search_string = search_string
176
+ this.fetch()
177
+ },
178
+ /**
179
+ * @description This action is used to delete a role
180
+ * @param {Integer} role_id id of the role to be deleted
181
+ */
182
+ deleteRole(role_id){
183
+ this.http.delete(this.url.admin('roles/:id', {id: role_id})).then(result => {
184
+ this.msg.success(I18n.t("core.users.messages_success_operation"))
185
+ this.fetch()
186
+ }).catch(error => {
187
+ this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
188
+ })
189
+ },
190
+ /**
191
+ * @description This action is used to fetch activity logs from a role
192
+ */
193
+ fetchLogs(){
194
+ this.loading = true
195
+ this.http.get(this.url.admin('roles/:id/activities', {id: this.role.id})).then(result => {
196
+ this.role_activities = result.activities
197
+ this.loading = false
198
+ }).catch(error => {
199
+ this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
200
+ })
201
+ }
202
+ }
203
+ })
@@ -0,0 +1,58 @@
1
+ /*
2
+ Lesli
3
+
4
+ Copyright (c) 2023, Lesli Technologies, S. A.
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with this program. If not, see http://www.gnu.org/licenses/.
18
+
19
+ Lesli · Ruby on Rails Development Platform.
20
+
21
+ Made with ♥ by https://www.lesli.tech
22
+ Building a better future, one line of code at a time.
23
+
24
+ @contact hello@lesli.tech
25
+ @website https://www.lesli.tech
26
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
27
+
28
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
29
+ // ·
30
+ */
31
+
32
+
33
+ // ·
34
+ import { defineStore } from "pinia"
35
+
36
+
37
+ // ·
38
+ export const useRoles = defineStore("guard.roles", {
39
+ state: () => {
40
+ return {
41
+ loading: false,
42
+ pagination: {},
43
+ records: []
44
+ }
45
+ },
46
+ actions: {
47
+ get() {
48
+ this.loading = true
49
+ this.http.get(this.url.security("roles")).then(result => {
50
+ this.records = result
51
+ }).catch(error => {
52
+ console.log(error)
53
+ }).finally(() => {
54
+ this.loading = false
55
+ })
56
+ },
57
+ }
58
+ })
@@ -0,0 +1,277 @@
1
+ {
2
+ "en": {
3
+ "lesli": {
4
+ "application": {
5
+ "navigation_logout": "Logout",
6
+ "navigation_my_profile": "My profile"
7
+ },
8
+ "dashboards": {
9
+ "column_default": "Default",
10
+ "column_name": "Name",
11
+ "title": "Dashboards",
12
+ "view_add_component": "Add component"
13
+ },
14
+ "shared": {
15
+ "button_add_new": "Add new",
16
+ "button_delete": "Delete",
17
+ "button_edit": "Edit",
18
+ "button_list": "List",
19
+ "button_reload": "Reload",
20
+ "button_save": "Save",
21
+ "button_settings": "Settings",
22
+ "button_show": "Show",
23
+ "toolbar_search": "Search...",
24
+ "view_discussions": "Discussions",
25
+ "view_files": "Files",
26
+ "view_quick_actions": "Quick actions",
27
+ "view_status_active": "Active",
28
+ "view_status_inactive": "Inactive"
29
+ }
30
+ },
31
+ "lesli_security": {
32
+ "users": {
33
+ "column_active": "Active",
34
+ "column_address": "Address",
35
+ "column_alias": "Alias",
36
+ "column_email": "Email",
37
+ "column_first_name": "First name",
38
+ "column_last_name": "Last name",
39
+ "column_salutation": "Salutation",
40
+ "column_telephone": "Telephone",
41
+ "column_title": "Title",
42
+ "tab_information": "Information",
43
+ "tab_roles_and_privileges": "Roles and privileges",
44
+ "tab_security": "Security",
45
+ "tab_sessions": "Sessions",
46
+ "tab_settings": "Settings",
47
+ "table_header_email": "Email",
48
+ "table_header_last_activity": "Last activity",
49
+ "table_header_last_sign_in": "Last sign in",
50
+ "table_header_name": "Name",
51
+ "table_header_roles": "Roles",
52
+ "table_header_status": "Status",
53
+ "view_title": "Users"
54
+ }
55
+ }
56
+ },
57
+ "es": {
58
+ "lesli": {
59
+ "application": {
60
+ "navigation_logout": "Cerrar sesión",
61
+ "navigation_my_profile": "Mi perfil"
62
+ },
63
+ "dashboards": {
64
+ "column_default": "Default",
65
+ "column_name": "Nombre",
66
+ "title": "Dashboards",
67
+ "view_add_component": "Agregar componente"
68
+ },
69
+ "shared": {
70
+ "button_add_new": "Agregar nuevo",
71
+ "button_delete": "Eliminar",
72
+ "button_edit": "Editar",
73
+ "button_list": "Lista",
74
+ "button_reload": "Recargar",
75
+ "button_save": "Guardar",
76
+ "button_settings": "Configuración",
77
+ "button_show": "Ver",
78
+ "toolbar_search": "Buscar...",
79
+ "view_discussions": "Discusiones",
80
+ "view_files": "Archivos",
81
+ "view_quick_actions": "Acciones rapidas",
82
+ "view_status_active": "Activo",
83
+ "view_status_inactive": "Inactivo"
84
+ }
85
+ },
86
+ "lesli_security": {
87
+ "users": {
88
+ "column_active": "Activo",
89
+ "column_address": "Dirección",
90
+ "column_alias": "Alias",
91
+ "column_email": "Email",
92
+ "column_first_name": "Nombre",
93
+ "column_last_name": "Apellido",
94
+ "column_salutation": "Saludo",
95
+ "column_telephone": "Teléfono",
96
+ "column_title": "Titulo",
97
+ "tab_information": "Información",
98
+ "tab_roles_and_privileges": "Roles y privilegios",
99
+ "tab_security": "Seguridad",
100
+ "tab_sessions": "Sesiones",
101
+ "tab_settings": "Configuración",
102
+ "table_header_email": "Email",
103
+ "table_header_last_activity": "Ultima actividad",
104
+ "table_header_last_sign_in": "Ultimo login",
105
+ "table_header_name": "Nombre",
106
+ "table_header_roles": "Roles",
107
+ "table_header_status": "Estado",
108
+ "view_title": "Usuarios"
109
+ }
110
+ }
111
+ },
112
+ "fr": {
113
+ "lesli": {
114
+ "application": {
115
+ "navigation_logout": ":lesli.application.navigation_logout:",
116
+ "navigation_my_profile": ":lesli.application.navigation_my_profile:"
117
+ },
118
+ "dashboards": {
119
+ "column_default": ":lesli.dashboards.column_default:",
120
+ "column_name": ":lesli.dashboards.column_name:",
121
+ "title": ":lesli.dashboards.title:",
122
+ "view_add_component": ":lesli.dashboards.view_add_component:"
123
+ },
124
+ "shared": {
125
+ "button_add_new": ":lesli.shared.button_add_new:",
126
+ "button_delete": ":lesli.shared.button_delete:",
127
+ "button_edit": ":lesli.shared.button_edit:",
128
+ "button_list": ":lesli.shared.button_list:",
129
+ "button_reload": ":lesli.shared.button_reload:",
130
+ "button_save": ":lesli.shared.button_save:",
131
+ "button_settings": ":lesli.shared.button_settings:",
132
+ "button_show": ":lesli.shared.button_show:",
133
+ "toolbar_search": ":lesli.shared.toolbar_search:",
134
+ "view_discussions": ":lesli.shared.view_discussions:",
135
+ "view_files": ":lesli.shared.view_files:",
136
+ "view_quick_actions": ":lesli.shared.view_quick_actions:",
137
+ "view_status_active": ":lesli.shared.view_status_active:",
138
+ "view_status_inactive": ":lesli.shared.view_status_inactive:"
139
+ }
140
+ },
141
+ "lesli_security": {
142
+ "users": {
143
+ "column_active": ":lesli_security.users.column_active:",
144
+ "column_address": ":lesli_security.users.column_address:",
145
+ "column_alias": ":lesli_security.users.column_alias:",
146
+ "column_email": ":lesli_security.users.column_email:",
147
+ "column_first_name": ":lesli_security.users.column_first_name:",
148
+ "column_last_name": ":lesli_security.users.column_last_name:",
149
+ "column_salutation": ":lesli_security.users.column_salutation:",
150
+ "column_telephone": ":lesli_security.users.column_telephone:",
151
+ "column_title": ":lesli_security.users.column_title:",
152
+ "tab_information": ":lesli_security.users.tab_information:",
153
+ "tab_roles_and_privileges": ":lesli_security.users.tab_roles_and_privileges:",
154
+ "tab_security": ":lesli_security.users.tab_security:",
155
+ "tab_sessions": ":lesli_security.users.tab_sessions:",
156
+ "tab_settings": ":lesli_security.users.tab_settings:",
157
+ "table_header_email": ":lesli_security.users.table_header_email:",
158
+ "table_header_last_activity": ":lesli_security.users.table_header_last_activity:",
159
+ "table_header_last_sign_in": ":lesli_security.users.table_header_last_sign_in:",
160
+ "table_header_name": ":lesli_security.users.table_header_name:",
161
+ "table_header_roles": ":lesli_security.users.table_header_roles:",
162
+ "table_header_status": ":lesli_security.users.table_header_status:",
163
+ "view_title": ":lesli_security.users.view_title:"
164
+ }
165
+ }
166
+ },
167
+ "it": {
168
+ "lesli": {
169
+ "application": {
170
+ "navigation_logout": ":lesli.application.navigation_logout:",
171
+ "navigation_my_profile": ":lesli.application.navigation_my_profile:"
172
+ },
173
+ "dashboards": {
174
+ "column_default": ":lesli.dashboards.column_default:",
175
+ "column_name": ":lesli.dashboards.column_name:",
176
+ "title": ":lesli.dashboards.title:",
177
+ "view_add_component": ":lesli.dashboards.view_add_component:"
178
+ },
179
+ "shared": {
180
+ "button_add_new": ":lesli.shared.button_add_new:",
181
+ "button_delete": ":lesli.shared.button_delete:",
182
+ "button_edit": ":lesli.shared.button_edit:",
183
+ "button_list": ":lesli.shared.button_list:",
184
+ "button_reload": ":lesli.shared.button_reload:",
185
+ "button_save": ":lesli.shared.button_save:",
186
+ "button_settings": ":lesli.shared.button_settings:",
187
+ "button_show": ":lesli.shared.button_show:",
188
+ "toolbar_search": ":lesli.shared.toolbar_search:",
189
+ "view_discussions": ":lesli.shared.view_discussions:",
190
+ "view_files": ":lesli.shared.view_files:",
191
+ "view_quick_actions": ":lesli.shared.view_quick_actions:",
192
+ "view_status_active": ":lesli.shared.view_status_active:",
193
+ "view_status_inactive": ":lesli.shared.view_status_inactive:"
194
+ }
195
+ },
196
+ "lesli_security": {
197
+ "users": {
198
+ "column_active": ":lesli_security.users.column_active:",
199
+ "column_address": ":lesli_security.users.column_address:",
200
+ "column_alias": ":lesli_security.users.column_alias:",
201
+ "column_email": ":lesli_security.users.column_email:",
202
+ "column_first_name": ":lesli_security.users.column_first_name:",
203
+ "column_last_name": ":lesli_security.users.column_last_name:",
204
+ "column_salutation": ":lesli_security.users.column_salutation:",
205
+ "column_telephone": ":lesli_security.users.column_telephone:",
206
+ "column_title": ":lesli_security.users.column_title:",
207
+ "tab_information": ":lesli_security.users.tab_information:",
208
+ "tab_roles_and_privileges": ":lesli_security.users.tab_roles_and_privileges:",
209
+ "tab_security": ":lesli_security.users.tab_security:",
210
+ "tab_sessions": ":lesli_security.users.tab_sessions:",
211
+ "tab_settings": ":lesli_security.users.tab_settings:",
212
+ "table_header_email": ":lesli_security.users.table_header_email:",
213
+ "table_header_last_activity": ":lesli_security.users.table_header_last_activity:",
214
+ "table_header_last_sign_in": ":lesli_security.users.table_header_last_sign_in:",
215
+ "table_header_name": ":lesli_security.users.table_header_name:",
216
+ "table_header_roles": ":lesli_security.users.table_header_roles:",
217
+ "table_header_status": ":lesli_security.users.table_header_status:",
218
+ "view_title": ":lesli_security.users.view_title:"
219
+ }
220
+ }
221
+ },
222
+ "pt": {
223
+ "lesli": {
224
+ "application": {
225
+ "navigation_logout": ":lesli.application.navigation_logout:",
226
+ "navigation_my_profile": ":lesli.application.navigation_my_profile:"
227
+ },
228
+ "dashboards": {
229
+ "column_default": ":lesli.dashboards.column_default:",
230
+ "column_name": ":lesli.dashboards.column_name:",
231
+ "title": ":lesli.dashboards.title:",
232
+ "view_add_component": ":lesli.dashboards.view_add_component:"
233
+ },
234
+ "shared": {
235
+ "button_add_new": ":lesli.shared.button_add_new:",
236
+ "button_delete": ":lesli.shared.button_delete:",
237
+ "button_edit": ":lesli.shared.button_edit:",
238
+ "button_list": ":lesli.shared.button_list:",
239
+ "button_reload": ":lesli.shared.button_reload:",
240
+ "button_save": ":lesli.shared.button_save:",
241
+ "button_settings": ":lesli.shared.button_settings:",
242
+ "button_show": ":lesli.shared.button_show:",
243
+ "toolbar_search": ":lesli.shared.toolbar_search:",
244
+ "view_discussions": ":lesli.shared.view_discussions:",
245
+ "view_files": ":lesli.shared.view_files:",
246
+ "view_quick_actions": ":lesli.shared.view_quick_actions:",
247
+ "view_status_active": ":lesli.shared.view_status_active:",
248
+ "view_status_inactive": ":lesli.shared.view_status_inactive:"
249
+ }
250
+ },
251
+ "lesli_security": {
252
+ "users": {
253
+ "column_active": ":lesli_security.users.column_active:",
254
+ "column_address": ":lesli_security.users.column_address:",
255
+ "column_alias": ":lesli_security.users.column_alias:",
256
+ "column_email": ":lesli_security.users.column_email:",
257
+ "column_first_name": ":lesli_security.users.column_first_name:",
258
+ "column_last_name": ":lesli_security.users.column_last_name:",
259
+ "column_salutation": ":lesli_security.users.column_salutation:",
260
+ "column_telephone": ":lesli_security.users.column_telephone:",
261
+ "column_title": ":lesli_security.users.column_title:",
262
+ "tab_information": ":lesli_security.users.tab_information:",
263
+ "tab_roles_and_privileges": ":lesli_security.users.tab_roles_and_privileges:",
264
+ "tab_security": ":lesli_security.users.tab_security:",
265
+ "tab_sessions": ":lesli_security.users.tab_sessions:",
266
+ "tab_settings": ":lesli_security.users.tab_settings:",
267
+ "table_header_email": ":lesli_security.users.table_header_email:",
268
+ "table_header_last_activity": ":lesli_security.users.table_header_last_activity:",
269
+ "table_header_last_sign_in": ":lesli_security.users.table_header_last_sign_in:",
270
+ "table_header_name": ":lesli_security.users.table_header_name:",
271
+ "table_header_roles": ":lesli_security.users.table_header_roles:",
272
+ "table_header_status": ":lesli_security.users.table_header_status:",
273
+ "view_title": ":lesli_security.users.view_title:"
274
+ }
275
+ }
276
+ }
277
+ }