ui: checkPriv for setTheme

This commit is contained in:
undefined committed 2022-03-17 17:45:16 +08:00
1 parent 35632cc1aa
commit c2d5696919
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -6,7 +6,7 @@ import { join } from 'path';
import { ObjectID } from 'mongodb';
import * as bus from 'hydrooj/src/service/bus';
import { Route, Handler } from 'hydrooj/src/service/server';
import { PERM } from 'hydrooj/src/model/builtin';
import { PERM, PRIV } from 'hydrooj/src/model/builtin';
import markdown from './backendlib/markdown';
const {
@@ -88,6 +88,7 @@ class SetThemeHandler extends Handler {
noCheckPermView = true;
async get({ theme }) {
this.checkPriv(PRIV.PRIV_USER_PROFILE);
await user.setById(this.user._id, { theme });
this.back();
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.34.11",
"version": "4.34.12",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",