Skip to content

Commit

Permalink
[MS] Add external profile tag in workspace sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
Max-7 committed Oct 31, 2024
1 parent 756451e commit 9909f91
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/src/components/workspaces/WorkspaceUserRole.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
>
{{ $msTranslate('UsersPage.currentUser') }}
</span>

<tag-profile
v-if="user.profile === UserProfile.Outsider"
:profile="UserProfile.Outsider"
/>
</div>

<ms-dropdown
Expand All @@ -29,7 +34,7 @@

<script setup lang="ts">
import { MsAppearance, MsDropdown, MsOption, MsOptions } from 'megashark-lib';
import UserAvatarName from '@/components/users/UserAvatarName.vue';
import { TagProfile, UserAvatarName } from '@/components/users';
import { canChangeRole } from '@/components/workspaces/utils';
import { UserProfile, UserTuple, WorkspaceRole } from '@/parsec';
import { getWorkspaceRoleTranslationKey } from '@/services/translation';
Expand Down
2 changes: 2 additions & 0 deletions client/tests/pw/e2e/workspace_sharing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ msTest('Workspace sharing modal default state', async ({ workspaceSharingModal }
// cspell:disable-next-line
await expect(users.locator('.person-name')).toHaveText(['Gordon Freeman', 'Korgan Bloodaxe', 'Jaheira']);
await expect(users.locator('.filter-button')).toHaveText(['Owner', 'Reader', 'Not shared']);
await expect(users.nth(2).locator('.label-profile')).toBeVisible();
await expect(users.nth(2).locator('.label-profile')).toHaveText('External');
await expect(users.nth(0).locator('.filter-button')).toHaveDisabledAttribute();
});

Expand Down
1 change: 1 addition & 0 deletions newsfragments/8245.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added an indication that the user is an outsider when sharing a workspace

0 comments on commit 9909f91

Please sign in to comment.