mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: domain group: only apply default limit when using search
This commit is contained in:
1 file changed
+1
-1
@@ -446,7 +446,7 @@ export const DomainApi = {
|
|||||||
}),
|
}),
|
||||||
async (ctx, args) => {
|
async (ctx, args) => {
|
||||||
if (!ctx.user.hasPerm(PERM.PERM_VIEW) && !ctx.user.hasPriv(PRIV.PRIV_VIEW_ALL_DOMAIN)) throw new PermissionError(PERM.PERM_VIEW);
|
if (!ctx.user.hasPerm(PERM.PERM_VIEW) && !ctx.user.hasPriv(PRIV.PRIV_VIEW_ALL_DOMAIN)) throw new PermissionError(PERM.PERM_VIEW);
|
||||||
return user.listGroup(args.domainId, args.uid, args.names, args.search, args.limit ?? 20);
|
return user.listGroup(args.domainId, args.uid, args.names, args.search, args.limit || (args.search ? 20 : undefined));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
'domain.group': Mutation(
|
'domain.group': Mutation(
|
||||||
|
|||||||
Reference in new issue
Block a user