Allow user and admin attribute permissions to be independantly set (#3472)
This commit is contained in:
parent
2bd2a28c80
commit
cc59f1547d
1 changed files with 2 additions and 3 deletions
|
@ -28,11 +28,10 @@ const Permissions = ({ name }: { name: string }) => {
|
|||
const option = "user";
|
||||
const changedValue = value.includes(option)
|
||||
? value.filter((item: string) => item !== option)
|
||||
: [option];
|
||||
: [...value, option];
|
||||
|
||||
onChange(changedValue);
|
||||
}}
|
||||
isDisabled={value.includes("admin")}
|
||||
/>
|
||||
</GridItem>
|
||||
<GridItem lg={8} sm={6}>
|
||||
|
@ -46,7 +45,7 @@ const Permissions = ({ name }: { name: string }) => {
|
|||
const option = "admin";
|
||||
const changedValue = value.includes(option)
|
||||
? value.filter((item: string) => item !== option)
|
||||
: ["user", option];
|
||||
: [...value, option];
|
||||
|
||||
onChange(changedValue);
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue