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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 345fee63065f22a5ce4b822038e3095394320c05ee61432a8c373e83ff8ba9bd
4
- data.tar.gz: 3605da78197ce04fa7066d877cdbb0aa5d3d9870a3cbdbc81671677065a9005d
3
+ metadata.gz: 88e8ea20f440da9eb9827f33e0301daf4aeac1411e21f29bd33b3929dbe82778
4
+ data.tar.gz: 4aa8af05a5f2d67a8c198670d9a79368466eeb25195ead43a0e9cbb23c9e6825
5
5
  SHA512:
6
- metadata.gz: 30c1f0372a0914644ea3aa458ff91dd63d24b7555952321616810e01b10c27cb204148e51fdb6a2f2c7f68b3c773ed8d11ef6e23e981eb50f9b5a111da4b6d75
7
- data.tar.gz: 75f414d54f460fc1ad1c9d93825232e49d7af483f2399853da890962850e36552360851dbe435899ca05dc1b22f92542a8cdadfa54608ae4b0323bfde7b96f9d
6
+ metadata.gz: b100221797d0162755bba22262f60a57234ec360761e73ae82a2310934709cfd821785295dd4657cdaf6f609792240c8741eee77a5882cf7ab564e6725a77641
7
+ data.tar.gz: 15b1587db6f39d1fcd256227b99fbac4fb80dcdd645a756661158c84af4a54591090a2afecfc9d467900a7f651a0772a4ea688954f435951d6683f71501dd5c0
@@ -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
- route = realm_admin_root + "/#{class_name}/#{object.id}"
68
- return parsed_response(path: url_fo(object)) if class_name == 'realm'
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
 
@@ -39,7 +39,7 @@ module Clonk
39
39
  # FIXME: untested!
40
40
  def policies_for(permission)
41
41
  parsed_response(
42
- path: "#{url_for(permission, prefix: 'policy')}/associatedPolicies"
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: "#{url_for(permission, prefix: 'policy')}/resources"
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: "#{url_for(permission, prefix: 'policy')}/scopes"
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: policies(permission) + policies,
72
- resources: resources(permission) + resources,
73
- scopes: scopes(permission) + 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.8
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-19 00:00:00.000000000 Z
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.2
89
+ rubygems_version: 3.0.1
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Keycloak/RHSSO admin API client