Skip to content

Commit 85f2e11

Browse files
committed
MB-47149 Add version to checkPermissionsURI
The checkPermissionsURI field will now always include a version to assist in determining when something related to the permissions has changed. Prior to this the version was only included for_ui calls. "checkPermissionsURI": "/pools/default/checkPermissions?v=ua21J2GkhnTQzt2mIa9uFB%2FUhH4%3D", Change-Id: Id0622ee3b1d39f8d3c6ed549dbcff3af50d3f32b Reviewed-on: https://review.couchbase.org/c/ns_server/+/165566 Well-Formed: Build Bot <[email protected]> Tested-by: Steve Watanabe <[email protected]> Reviewed-by: Abhijeeth Nuthan <[email protected]>
1 parent 25c75ce commit 85f2e11

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/menelaus_web_pools.erl

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ do_build_pool_info(Id, InfoLevel, Stability, LocalAddr) ->
237237
{clusterEncryptionLevel,
238238
misc:get_effective_cluster_encryption_level(Config)},
239239
{balanced, ns_cluster_membership:is_balanced()},
240-
build_check_permissions_uri(InfoLevel, Id, Snapshot),
240+
build_check_permissions_uri(Id, Snapshot),
241241
menelaus_web_node:build_memory_quota_info(Config),
242242
build_ui_params(InfoLevel, Snapshot),
243243
build_internal_params(InfoLevel),
@@ -275,15 +275,9 @@ build_ui_params(for_ui, Snapshot) ->
275275
build_ui_params(_, _) ->
276276
[].
277277

278-
build_check_permissions_uri(InfoLevel, Id, Snapshot) ->
279-
Params =
280-
case InfoLevel of
281-
for_ui ->
282-
[{"v",
283-
menelaus_web_rbac:check_permissions_url_version(Snapshot)}];
284-
_ ->
285-
[]
286-
end,
278+
build_check_permissions_uri(Id, Snapshot) ->
279+
Params = [{"v",
280+
menelaus_web_rbac:check_permissions_url_version(Snapshot)}],
287281
{checkPermissionsURI, bin_concat_path(["pools", Id, "checkPermissions"],
288282
Params)}.
289283

0 commit comments

Comments
 (0)