Updated GroupMembers feature to not show action button if isAdmin and is current user

• Updated:
- GroupMembers feature to not show action button if isAdmin and is current user
This commit is contained in:
mgabdev 2020-08-14 12:46:48 -05:00
parent 017eb0e99d
commit 3369f559a7

View File

@ -3,6 +3,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'
import debounce from 'lodash.debounce'
import isObject from 'lodash.isobject'
import { FormattedMessage } from 'react-intl'
import { me } from '../initial_state'
import {
fetchMembers,
expandMembers,
@ -128,7 +129,7 @@ class GroupMembers extends ImmutablePureComponent {
compact
key={id}
id={id}
actionIcon={!isAdmin ? undefined : 'ellipsis'}
actionIcon={(!isAdmin || id === me) ? undefined : 'ellipsis'}
onActionClick={(data, event) => {
return !isAdmin ? false : this.handleOpenGroupMemberOptions(event, id)
}}