Skip to content

Commit

Permalink
Fix linagora#814 (and previous commit was linagora#864)
Browse files Browse the repository at this point in the history
  • Loading branch information
RomaricMourgues committed Feb 4, 2021
1 parent 6fc79c4 commit 7da24da
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Icon from 'app/components/Icon/Icon';
import AccessRightsService from 'app/services/AccessRightsService';
import RouterServices from 'services/RouterService';
import Collection from 'app/services/Collections/Collection';
import UsersService from 'services/user/user.js';

const { Text } = Typography;

Expand All @@ -29,6 +30,7 @@ export default (props: Props) => {
const { workspaceId } = RouterServices.useRouteState(({ workspaceId }) => {
return { workspaceId };
});
const userId: string = UsersService.getCurrentUserId();

const { avatar, name, users } = getUserParts({
usersIds: [props.userId] || [],
Expand Down Expand Up @@ -114,7 +116,9 @@ export default (props: Props) => {
<Col flex={4}>
<Text strong>{name}</Text> @{users[0]?.username}
</Col>
{AccessRightsService.hasLevel(workspaceId || '', 'member') && userEvents}
{AccessRightsService.hasLevel(workspaceId || '', 'member') &&
props.userId !== userId &&
userEvents}
</Row>
);
};

0 comments on commit 7da24da

Please sign in to comment.