mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: allow unlimited access & fix file corruption when errored (#726)
Co-authored-by: undefined <i@undefined.moe>
This commit is contained in:
1 parent
1f2100b9d1
commit
7ea3c91f5f
6 files changed
+42
-37
No files matched your search
@@ -178,6 +178,7 @@ export class HandlerCommon {
|
||||
export class Handler extends HandlerCommon {
|
||||
loginMethods: any;
|
||||
noCheckPermView = false;
|
||||
notUsage = false;
|
||||
allowCors = false;
|
||||
__param: Record<string, decorators.ParamOption<any>[]>;
|
||||
|
||||
@@ -207,7 +208,7 @@ export class Handler extends HandlerCommon {
|
||||
this.context.pendingError = new CsrfTokenError();
|
||||
}
|
||||
}
|
||||
if (!argv.options.benchmark) await this.limitRate('global', 5, 100);
|
||||
if (!argv.options.benchmark && !this.notUsage) await this.limitRate('global', 5, 100);
|
||||
if (!this.noCheckPermView && !this.user.hasPriv(PRIV.PRIV_VIEW_ALL_DOMAIN)) this.checkPerm(PERM.PERM_VIEW);
|
||||
this.loginMethods = Object.keys(global.Hydro.module.oauth)
|
||||
.map((key) => ({
|
||||
|
||||
Reference in new issue
Block a user