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:
parent
ab1173182c
commit
f5dc034c0a
4 changed files with 16 additions and 4 deletions
|
@ -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" />
|
||||
|
|
|
@ -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",
|
||||
),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -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",
|
||||
),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -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",
|
||||
),
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue