fix: visible groups (#2729)
* updated readme to give some light testing instructions * updated tests to accept new behavior for group memberships * use test factories in more places * add debug logs for mailer events in development
This commit is contained in:
@@ -33,13 +33,6 @@ router.post("groups.list", auth(), pagination(), async (ctx) => {
|
||||
limit: ctx.state.pagination.limit,
|
||||
});
|
||||
|
||||
if (!user.isAdmin) {
|
||||
groups = groups.filter(
|
||||
(group) =>
|
||||
group.groupMemberships.filter((gm) => gm.userId === user.id).length
|
||||
);
|
||||
}
|
||||
|
||||
ctx.body = {
|
||||
pagination: ctx.state.pagination,
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user