Skip to content

Commit

Permalink
Update permissions decisions for global and object permissions (#4642)
Browse files Browse the repository at this point in the history
* udpate object permissions

* update global permissions
  • Loading branch information
pa-lem authored Oct 16, 2024
1 parent 5818556 commit fba88b0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ export const GET_ROLE_MANAGEMENT_OBJECT_PERMISSIONS = gql`
name {
value
}
branch {
value
}
namespace {
value
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ export const GlobalPermissionForm = ({

const decisionOptions = [
{
value: "allow",
label: "Allow",
value: 1,
label: "Deny",
},
{
value: "deny",
label: "Deny",
value: 6,
label: "Allow",
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,20 @@ export const ObjectPermissionForm = ({

const decisionOptions = [
{
value: "allow",
label: "Allow",
value: 1,
label: "Deny",
},
{
value: "deny",
label: "Deny",
value: 2,
label: "Allow Default",
},
{
value: 4,
label: "Allow Other",
},
{
value: 6,
label: "Allow All",
},
];

Expand Down Expand Up @@ -141,13 +149,6 @@ export const ObjectPermissionForm = ({
return (
<div className={"bg-custom-white flex flex-col flex-1 overflow-auto p-4"}>
<Form form={form} onSubmit={handleSubmit}>
<DropdownField
name="branch"
label="Branch"
items={branchesOptions}
rules={{ required: true, validate: { required: isRequired } }}
/>

<NodeSelect />

<DropdownField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ function Permissions() {
name: "display",
label: "Name",
},
{
name: "branch",
label: "Branch",
},
{
name: "namespace",
label: "Namespace",
Expand Down Expand Up @@ -98,9 +94,6 @@ function Permissions() {
</div>
),
},
branch: {
value: edge?.node?.branch?.value,
},
namespace: {
value: edge?.node?.namespace?.value,
},
Expand Down

0 comments on commit fba88b0

Please sign in to comment.