fix: Missing permission on selector in permissions dialog
This commit is contained in:
@@ -87,4 +87,16 @@ export default class CollectionGroupMembershipsStore extends Store<CollectionGro
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Find a collection group membership by collectionId and groupId
|
||||
*
|
||||
* @param collectionId The collection ID
|
||||
* @param groupId The group ID
|
||||
* @returns The collection group membership or undefined if not found.
|
||||
*/
|
||||
find = (collectionId: string, groupId: string) =>
|
||||
Array.from(this.data.values()).find(
|
||||
(m) => m.groupId === groupId && m.collectionId === collectionId
|
||||
);
|
||||
}
|
||||
|
||||
@@ -91,11 +91,21 @@ export default class MembershipsStore extends Store<Membership> {
|
||||
collectionId: string;
|
||||
userId: string;
|
||||
}) => {
|
||||
const membership = Array.from(this.data.values()).find(
|
||||
(m) => m.userId === userId && m.collectionId === collectionId
|
||||
);
|
||||
const membership = this.find(collectionId, userId);
|
||||
if (membership) {
|
||||
this.remove(membership.id);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Find a collection user membership by collectionId and userId
|
||||
*
|
||||
* @param collectionId The collection ID
|
||||
* @param userId The user ID
|
||||
* @returns The collection user membership or undefined if not found.
|
||||
*/
|
||||
find = (collectionId: string, userId: string) =>
|
||||
Array.from(this.data.values()).find(
|
||||
(m) => m.userId === userId && m.collectionId === collectionId
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user