Allow authorization changes with fine-grained client access and manage-authorization. (#25280)

Signed-off-by: Stan Silvert <ssilvert@redhat.com>
This commit is contained in:
Stan Silvert 2023-12-06 08:16:04 -05:00 committed by GitHub
parent ab1173182c
commit f5dc034c0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 4 deletions

View file

@ -198,7 +198,7 @@ export default function PolicyDetails() {
<FormAccess
isHorizontal
onSubmit={handleSubmit(onSubmit)}
role="view-clients"
role="anyone" // if you get this far it means you have access
>
<FormProvider {...form}>
<NameDescription isDisabled={isDisabled} prefix="policy" />

View file

@ -21,7 +21,11 @@ export const PermissionDetailsRoute: AppRouteObject = {
breadcrumb: (t) => t("permissionDetails"),
handle: {
access: (accessChecker) =>
accessChecker.hasAny("manage-clients", "view-authorization"),
accessChecker.hasAny(
"manage-clients",
"view-authorization",
"manage-authorization",
),
},
};

View file

@ -20,7 +20,11 @@ export const PolicyDetailsRoute: AppRouteObject = {
breadcrumb: (t) => t("policyDetails"),
handle: {
access: (accessChecker) =>
accessChecker.hasAny("manage-clients", "view-authorization"),
accessChecker.hasAny(
"manage-clients",
"view-authorization",
"manage-authorization",
),
},
};

View file

@ -17,7 +17,11 @@ export const ResourceDetailsRoute: AppRouteObject = {
breadcrumb: (t) => t("resourceDetails"),
handle: {
access: (accessChecker) =>
accessChecker.hasAny("manage-clients", "view-authorization"),
accessChecker.hasAny(
"manage-clients",
"view-authorization",
"manage-authorization",
),
},
};