mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add noCheckPermView to basic routes
This commit is contained in:
1 parent
042acba3e7
commit
eb6f1abc8b
2 files changed
+9
-1
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "4.0.9",
|
"version": "4.0.10",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/plugin-api",
|
"main": "src/plugin-api",
|
||||||
"module": "src/plugin-api",
|
"module": "src/plugin-api",
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import { builtinConfig } from '../settings';
|
|||||||
import { md5, sortFiles } from '../utils';
|
import { md5, sortFiles } from '../utils';
|
||||||
|
|
||||||
class SwitchLanguageHandler extends Handler {
|
class SwitchLanguageHandler extends Handler {
|
||||||
|
noCheckPermView = true;
|
||||||
|
|
||||||
@param('lang', Types.Name)
|
@param('lang', Types.Name)
|
||||||
async get(domainId: string, lang: string) {
|
async get(domainId: string, lang: string) {
|
||||||
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
|
if (this.user.hasPriv(PRIV.PRIV_USER_PROFILE)) {
|
||||||
@@ -29,6 +31,8 @@ class SwitchLanguageHandler extends Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class FilesHandler extends Handler {
|
export class FilesHandler extends Handler {
|
||||||
|
noCheckPermView = true;
|
||||||
|
|
||||||
@param('pjax', Types.Boolean)
|
@param('pjax', Types.Boolean)
|
||||||
async get(domainId: string, pjax = false) {
|
async get(domainId: string, pjax = false) {
|
||||||
if (!this.user._files?.length) this.checkPriv(PRIV.PRIV_CREATE_FILE);
|
if (!this.user._files?.length) this.checkPriv(PRIV.PRIV_CREATE_FILE);
|
||||||
@@ -85,6 +89,8 @@ export class FilesHandler extends Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class FSDownloadHandler extends Handler {
|
export class FSDownloadHandler extends Handler {
|
||||||
|
noCheckPermView = true;
|
||||||
|
|
||||||
@param('uid', Types.Int)
|
@param('uid', Types.Int)
|
||||||
@param('filename', Types.Name)
|
@param('filename', Types.Name)
|
||||||
@param('noDisposition', Types.Boolean)
|
@param('noDisposition', Types.Boolean)
|
||||||
@@ -105,6 +111,8 @@ export class FSDownloadHandler extends Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class StorageHandler extends Handler {
|
export class StorageHandler extends Handler {
|
||||||
|
noCheckPermView = true;
|
||||||
|
|
||||||
@param('target', Types.Name)
|
@param('target', Types.Name)
|
||||||
@param('filename', Types.Name, true)
|
@param('filename', Types.Name, true)
|
||||||
@param('expire', Types.UnsignedInt)
|
@param('expire', Types.UnsignedInt)
|
||||||
|
|||||||
Reference in new issue
Block a user