-
Notifications
You must be signed in to change notification settings - Fork 14
BC-10804 - Bug fix for Room Admin Table Deleting Members #3922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
37462f8
de445f8
1cf1869
3ed8399
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,7 +78,7 @@ withDefaults(defineProps<Props>(), { | |
|
|
||
| const { t } = useI18n(); | ||
| const roomMembersStore = useRoomMembersStore(); | ||
| const { roomMembersWithoutApplicants, roomMembersForAdmins, selectedIds, baseTableHeaders } = | ||
| const { currentUserId, roomMembersWithoutApplicants, roomMembersForAdmins, selectedIds, baseTableHeaders } = | ||
| storeToRefs(roomMembersStore); | ||
| const { isRoomOwner, removeMembers, fetchMembers } = roomMembersStore; | ||
| const { askConfirmation } = useConfirmationDialog(); | ||
|
|
@@ -163,6 +163,11 @@ const canRemoveMember = (item: RoomMember | string[]) => { | |
| const members = membersByIds(item); | ||
| return members.every(canRemoveMember); | ||
| } | ||
|
|
||
| if (currentUserId.value && isRoomOwner(currentUserId.value)) { | ||
| return !isRoomOwner(item.userId); | ||
|
||
| } | ||
|
|
||
| return !isRoomOwner(item.userId) && belongsToOwnSchool(item.userId); | ||
| }; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there can be only one person as room owner and we checked already in the if above do we still need this check? would currentUserId.value === item.userId be enough? But I am really confused by the whole topic so... :)