forked from jsnbuchanan/crowd-funder-for-time-pwa
feat: restrict dialog access based on user roles
- AdmitPendingMembersDialog now only triggers for meeting organizers - SetBulkVisibilityDialog now only triggers for members who can see other members - Removes overly restrictive admission status check for visibility dialog - Ensures proper role-based access control for meeting management features
This commit is contained in:
@@ -549,6 +549,16 @@ export default class MembersList extends Vue {
|
||||
* - This is a manual refresh (isManualRefresh flag is set)
|
||||
*/
|
||||
shouldShowVisibilityDialog(): boolean {
|
||||
// Only show for members who can see other members (i.e., they are in the decrypted members list)
|
||||
const currentUserMember = this.decryptedMembers.find(
|
||||
(member) => member.did === this.activeDid,
|
||||
);
|
||||
|
||||
// If the current user is not in the decrypted members list, they can't see anyone
|
||||
if (!currentUserMember) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const currentMembers = this.getMembersForVisibility();
|
||||
|
||||
if (currentMembers.length === 0) {
|
||||
@@ -595,6 +605,11 @@ export default class MembersList extends Vue {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only show for the organizer of the meeting
|
||||
if (!this.isOrganizer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const pendingMembers = this.getPendingMembers();
|
||||
return pendingMembers.length > 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user