clonk 2.2.8 → 2.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/clonk/connection.rb +7 -2
- data/lib/clonk/permission.rb +6 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88e8ea20f440da9eb9827f33e0301daf4aeac1411e21f29bd33b3929dbe82778
|
4
|
+
data.tar.gz: 4aa8af05a5f2d67a8c198670d9a79368466eeb25195ead43a0e9cbb23c9e6825
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b100221797d0162755bba22262f60a57234ec360761e73ae82a2310934709cfd821785295dd4657cdaf6f609792240c8741eee77a5882cf7ab564e6725a77641
|
7
|
+
data.tar.gz: 15b1587db6f39d1fcd256227b99fbac4fb80dcdd645a756661158c84af4a54591090a2afecfc9d467900a7f651a0772a4ea688954f435951d6683f71501dd5c0
|
data/lib/clonk/connection.rb
CHANGED
@@ -63,9 +63,14 @@ module Clonk
|
|
63
63
|
#++
|
64
64
|
def config(object)
|
65
65
|
class_name = object.class.name.split('::').last.downcase + 's'
|
66
|
+
return parsed_response(path: url_for(object)) if class_name == 'realms'
|
66
67
|
class_name = 'roles-by-id' if class_name == 'roles'
|
67
|
-
|
68
|
-
|
68
|
+
if class_name == 'permissions'
|
69
|
+
realm_management = clients.find { |client| client.name == 'realm-management' }
|
70
|
+
route = "#{url_for(realm_management)}/authz/resource-server/permission/scope/#{object.id}"
|
71
|
+
else
|
72
|
+
route = realm_admin_root + "/#{class_name}/#{object.id}"
|
73
|
+
end
|
69
74
|
parsed_response(path: route)
|
70
75
|
end
|
71
76
|
|
data/lib/clonk/permission.rb
CHANGED
@@ -39,7 +39,7 @@ module Clonk
|
|
39
39
|
# FIXME: untested!
|
40
40
|
def policies_for(permission)
|
41
41
|
parsed_response(
|
42
|
-
path: "#{
|
42
|
+
path: "#{url_for_permission(permission, prefix: 'policy')}/associatedPolicies"
|
43
43
|
)
|
44
44
|
end
|
45
45
|
|
@@ -48,7 +48,7 @@ module Clonk
|
|
48
48
|
# FIXME: untested!
|
49
49
|
def resources_for(permission)
|
50
50
|
parsed_response(
|
51
|
-
path: "#{
|
51
|
+
path: "#{url_for_permission(permission, prefix: 'policy')}/resources"
|
52
52
|
)
|
53
53
|
end
|
54
54
|
|
@@ -57,7 +57,7 @@ module Clonk
|
|
57
57
|
# FIXME: untested
|
58
58
|
def scopes_for(permission)
|
59
59
|
parsed_response(
|
60
|
-
path: "#{
|
60
|
+
path: "#{url_for_permission(permission, prefix: 'policy')}/scopes"
|
61
61
|
)
|
62
62
|
end
|
63
63
|
|
@@ -68,9 +68,9 @@ module Clonk
|
|
68
68
|
permission:, policies: [], resources: [], scopes: []
|
69
69
|
)
|
70
70
|
data = config(permission).merge(
|
71
|
-
policies
|
72
|
-
resources
|
73
|
-
scopes
|
71
|
+
"policies" => policies_for(permission) + policies,
|
72
|
+
"resources" => resources_for(permission) + resources,
|
73
|
+
"scopes" => scopes_for(permission) + scopes
|
74
74
|
)
|
75
75
|
parsed_response(
|
76
76
|
path: url_for(permission),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clonk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Fish
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '0'
|
88
88
|
requirements: []
|
89
|
-
rubygems_version: 3.0.
|
89
|
+
rubygems_version: 3.0.1
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: Keycloak/RHSSO admin API client
|