Skip to content

Commit

Permalink
allow demoting to standard (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
huang0h authored Jun 18, 2024
1 parent 97d7f64 commit 4189b0d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/components/forms/changePrivilegeForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,14 @@ const ChangePrivilegeForm: React.FC<ChangePrivilegeFormProps> = ({
placeholder={t('change_privilege.new_role')}
onChange={onRoleChange}
>
<Select.Option value={'STANDARD'}>
{t('roles.standard')}
</Select.Option>
<Select.Option value={'ADMIN'}>{t('roles.admin')}</Select.Option>
{privilegeLevel === PrivilegeLevel.SUPER_ADMIN && (
<>
<Select.Option value={'STANDARD'}>
{t('roles.standard')}
</Select.Option>
<Select.Option value={'SUPER_ADMIN'}>
{t('roles.super_admin')}
</Select.Option>
</>
<Select.Option value={'SUPER_ADMIN'}>
{t('roles.super_admin')}
</Select.Option>
)}
</RoleDropdown>
</Form.Item>
Expand Down

0 comments on commit 4189b0d

Please sign in to comment.