File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
resources/scripts/components/server/users Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -51,17 +51,18 @@ export default ({ subuser }: Props) => {
5151 </ p >
5252 < p css = { tw `text-2xs text-neutral-500 uppercase` } > Permissions</ p >
5353 </ div >
54- < button
55- type = { 'button' }
56- aria-label = { 'Edit subuser' }
57- css = { [
58- tw `block text-sm p-2 text-neutral-500 hover:text-neutral-100 transition-colors duration-150 mx-4` ,
59- subuser . uuid === uuid ? tw `hidden` : undefined ,
60- ] }
61- onClick = { ( ) => setVisible ( true ) }
62- >
63- < FontAwesomeIcon icon = { faPencilAlt } />
64- </ button >
54+ < Can action = { 'user.update' } >
55+ { subuser . uuid !== uuid &&
56+ < button
57+ type = { 'button' }
58+ aria-label = { 'Edit subuser' }
59+ css = { tw `block text-sm p-2 text-neutral-500 hover:text-neutral-100 transition-colors duration-150 mx-4` }
60+ onClick = { ( ) => setVisible ( true ) }
61+ >
62+ < FontAwesomeIcon icon = { faPencilAlt } />
63+ </ button >
64+ }
65+ </ Can >
6566 < Can action = { 'user.delete' } >
6667 < RemoveSubuserButton subuser = { subuser } />
6768 </ Can >
You can’t perform that action at this time.
0 commit comments