1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-23 01:22:30 +01:00

Fix permissions on subuser rows

This commit is contained in:
Dane Everitt 2020-08-01 21:25:28 -07:00
parent b52fc0b4d9
commit 9387be3b0d
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -51,17 +51,18 @@ export default ({ subuser }: Props) => {
</p> </p>
<p css={tw`text-2xs text-neutral-500 uppercase`}>Permissions</p> <p css={tw`text-2xs text-neutral-500 uppercase`}>Permissions</p>
</div> </div>
<button <Can action={'user.update'}>
type={'button'} {subuser.uuid !== uuid &&
aria-label={'Edit subuser'} <button
css={[ type={'button'}
tw`block text-sm p-2 text-neutral-500 hover:text-neutral-100 transition-colors duration-150 mx-4`, aria-label={'Edit subuser'}
subuser.uuid === uuid ? tw`hidden` : undefined, css={tw`block text-sm p-2 text-neutral-500 hover:text-neutral-100 transition-colors duration-150 mx-4`}
]} onClick={() => setVisible(true)}
onClick={() => setVisible(true)} >
> <FontAwesomeIcon icon={faPencilAlt}/>
<FontAwesomeIcon icon={faPencilAlt}/> </button>
</button> }
</Can>
<Can action={'user.delete'}> <Can action={'user.delete'}>
<RemoveSubuserButton subuser={subuser}/> <RemoveSubuserButton subuser={subuser}/>
</Can> </Can>