arkaan 0.10.11 → 0.10.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/arkaan/permissions/group.rb +3 -0
- data/lib/arkaan/utils/controller_without_filter.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b073888f8255f079daeb478d56d5318cc20b2ca
|
4
|
+
data.tar.gz: 76780deffb583fea6a3dc5d73f7ef57512329d28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1cdfd8eba8397b9af89b28cf8cc02bf489c23a44e4e682931816a25c16975a66502d2016abbf4c91215f67e3548d0831189c5845017a70a97db8b3d0c69b52b
|
7
|
+
data.tar.gz: e3381ade3dddebd267c15032b8a65f936ef7d69cd7f1019dc5a4bcefc9c3fbe66033a1b23830f757a286fa5aa7660c389c8d55222271da3fb2a42244ed12eedb
|
@@ -10,6 +10,9 @@ module Arkaan
|
|
10
10
|
# @!attribute [rw] is_default
|
11
11
|
# @return [Boolean] a boolean indicating whether this group is given when a new user registered or not.
|
12
12
|
field :is_default, type: Boolean, default: false
|
13
|
+
# @!attribute [rw] is_superuser
|
14
|
+
# @return [Boolean] a boolean indicating whether this group should have access to all groups and rights or not.
|
15
|
+
field :is_superuser, type: Boolean, default: false
|
13
16
|
|
14
17
|
# @!attribute [rw] accounts
|
15
18
|
# @return [Array<Arkaan::Account>] the accounts having the rights granted by this group.
|
@@ -26,7 +26,11 @@ module Arkaan
|
|
26
26
|
def self.declare_route_with(verb, path, premium, &block)
|
27
27
|
service = Arkaan::Utils::MicroService.instance.service
|
28
28
|
unless service.nil? || !service.routes.where(path: path, verb: verb).first.nil?
|
29
|
-
Arkaan::Monitoring::Route.create(path: path, verb: verb, premium: premium, service: service)
|
29
|
+
route = Arkaan::Monitoring::Route.create(path: path, verb: verb, premium: premium, service: service)
|
30
|
+
Arkaan::Permissions::Group.where(is_superuser: true).each do |group|
|
31
|
+
groupe.routes << route
|
32
|
+
groupe.save
|
33
|
+
end
|
30
34
|
end
|
31
35
|
if premium
|
32
36
|
self.public_send(verb, path) do
|