Merge pull request #2763 from AreYouRlyScared/hidedelifown
Hide delete button on own subuser if for the subuser looking at the page
This commit is contained in:
commit
a06f8e0d21
1 changed files with 17 additions and 15 deletions
|
@ -48,8 +48,9 @@ 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>
|
||||||
<Can action={'user.update'}>
|
|
||||||
{subuser.uuid !== uuid &&
|
{subuser.uuid !== uuid &&
|
||||||
|
<>
|
||||||
|
<Can action={'user.update'}>
|
||||||
<button
|
<button
|
||||||
type={'button'}
|
type={'button'}
|
||||||
aria-label={'Edit subuser'}
|
aria-label={'Edit subuser'}
|
||||||
|
@ -58,11 +59,12 @@ export default ({ subuser }: Props) => {
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faPencilAlt} />
|
<FontAwesomeIcon icon={faPencilAlt} />
|
||||||
</button>
|
</button>
|
||||||
}
|
|
||||||
</Can>
|
</Can>
|
||||||
<Can action={'user.delete'}>
|
<Can action={'user.delete'}>
|
||||||
<RemoveSubuserButton subuser={subuser} />
|
<RemoveSubuserButton subuser={subuser} />
|
||||||
</Can>
|
</Can>
|
||||||
|
</>
|
||||||
|
}
|
||||||
</GreyRowBox>
|
</GreyRowBox>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue