chef-zero 4.6.0 → 4.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef_zero/endpoints/actor_endpoint.rb +12 -11
- data/lib/chef_zero/endpoints/actors_endpoint.rb +1 -1
- data/lib/chef_zero/version.rb +1 -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: 89e89d5a719b55d744d62cea1d0dcfeb87d8e295
|
4
|
+
data.tar.gz: b638371b3c6f3570e00037ac3a0952fa11d0ce63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 253ea9e0d6893270f4b98603947dd6cb7da8d4c0e2298ec1312ea693752108696120617eb05e3f373fc7cd9954506b42fcc33cdf25bf14f2089dd365c5a5c370
|
7
|
+
data.tar.gz: 2b733043fe37e015d796c2e7353981022ca46a348af15b1185147e8bb73b47a9b73775022eaa823d582a11cae8241649acfe67eaba75535cec33b743dc6904ec
|
@@ -161,22 +161,23 @@ module ChefZero
|
|
161
161
|
|
162
162
|
# Return the data store keys path for the request client or user, e.g.
|
163
163
|
#
|
164
|
-
#
|
165
|
-
#
|
166
|
-
#
|
167
|
-
#
|
168
|
-
# [ "user_keys", <user>, "keys" ]
|
164
|
+
# /organizations/ORG/clients/CLIENT -> /organizations/ORG/client_keys/CLIENT/keys
|
165
|
+
# /organizations/ORG/users/USER -> /organizations/ORG/user_keys/USER/keys
|
166
|
+
# /users/USER -> /user_keys/USER
|
169
167
|
#
|
170
168
|
def keys_path_base(request, client_or_user_name=nil)
|
171
169
|
rest_path = (rest_path || request.rest_path).dup
|
172
|
-
rest_path
|
173
|
-
|
174
|
-
|
175
|
-
|
170
|
+
rest_path = rest_path.dup
|
171
|
+
case rest_path[-2]
|
172
|
+
when "users"
|
173
|
+
rest_path[-2] = "user_keys"
|
174
|
+
when "clients"
|
175
|
+
rest_path[-2] = "client_keys"
|
176
176
|
else
|
177
|
-
|
177
|
+
raise "Unexpected URL #{rest_path.join("/")}: cannot determine key path"
|
178
178
|
end
|
179
|
-
|
179
|
+
rest_path << "keys"
|
180
|
+
rest_path
|
180
181
|
end
|
181
182
|
end
|
182
183
|
end
|
data/lib/chef_zero/version.rb
CHANGED