mirror of
https://github.com/outline/outline.git
synced 2026-06-13 03:14:59 +03:00
Remove default user scope on GroupUser (#11531)
* Remove default user scope on GroupUser * revert
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import type { InferAttributes, InferCreationAttributes } from "sequelize";
|
||||
import {
|
||||
DefaultScope,
|
||||
BelongsTo,
|
||||
ForeignKey,
|
||||
Column,
|
||||
@@ -14,13 +13,6 @@ import User from "./User";
|
||||
import Model from "./base/Model";
|
||||
import Fix from "./decorators/Fix";
|
||||
|
||||
@DefaultScope(() => ({
|
||||
include: [
|
||||
{
|
||||
association: "user",
|
||||
},
|
||||
],
|
||||
}))
|
||||
@Scopes(() => ({
|
||||
withGroup: {
|
||||
include: [
|
||||
|
||||
@@ -104,7 +104,7 @@ router.post(
|
||||
groupMemberships: (
|
||||
await Promise.all(
|
||||
groups.map((group) =>
|
||||
GroupUser.findAll({
|
||||
GroupUser.scope("withUser").findAll({
|
||||
where: {
|
||||
groupId: group.id,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user