Added permission type to scope based permissions (#2575)
This commit is contained in:
parent
1447a77dc1
commit
24ec9fd60a
1 changed files with 22 additions and 23 deletions
|
@ -242,7 +242,6 @@ export default function PermissionDetails() {
|
||||||
validated={errors.description ? "error" : "default"}
|
validated={errors.description ? "error" : "default"}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
{permissionType !== "scope" && (
|
|
||||||
<FormGroup
|
<FormGroup
|
||||||
label={t("applyToResourceTypeFlag")}
|
label={t("applyToResourceTypeFlag")}
|
||||||
fieldId="applyToResourceTypeFlag"
|
fieldId="applyToResourceTypeFlag"
|
||||||
|
@ -262,7 +261,6 @@ export default function PermissionDetails() {
|
||||||
onChange={setApplyToResourceTypeFlag}
|
onChange={setApplyToResourceTypeFlag}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
)}
|
|
||||||
{applyToResourceTypeFlag ? (
|
{applyToResourceTypeFlag ? (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
label={t("resourceType")}
|
label={t("resourceType")}
|
||||||
|
@ -273,11 +271,12 @@ export default function PermissionDetails() {
|
||||||
fieldLabelId="resourceType"
|
fieldLabelId="resourceType"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
isRequired={permissionType === "scope"}
|
||||||
>
|
>
|
||||||
<KeycloakTextInput
|
<KeycloakTextInput
|
||||||
id="resourceType"
|
id="resourceType"
|
||||||
name="resourceType"
|
name="resourceType"
|
||||||
ref={register}
|
ref={register({ required: permissionType === "scope" })}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
) : (
|
) : (
|
||||||
|
@ -292,7 +291,7 @@ export default function PermissionDetails() {
|
||||||
}
|
}
|
||||||
helperTextInvalid={t("common:required")}
|
helperTextInvalid={t("common:required")}
|
||||||
validated={errors.resources ? "error" : "default"}
|
validated={errors.resources ? "error" : "default"}
|
||||||
isRequired
|
isRequired={permissionType !== "scope"}
|
||||||
>
|
>
|
||||||
<ResourcesPolicySelect
|
<ResourcesPolicySelect
|
||||||
name="resources"
|
name="resources"
|
||||||
|
@ -306,7 +305,7 @@ export default function PermissionDetails() {
|
||||||
? SelectVariant.typeahead
|
? SelectVariant.typeahead
|
||||||
: SelectVariant.typeaheadMulti
|
: SelectVariant.typeaheadMulti
|
||||||
}
|
}
|
||||||
isRequired
|
isRequired={permissionType !== "scope"}
|
||||||
/>
|
/>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue