mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: 修复无PERM_VIEW_PROBLEM在user_detail能够查看到题目标题的错误
This commit is contained in:
1 parent
bc3fc23ff3
commit
2328bada9d
3 files changed
+18
-11
No files matched your search
@@ -143,13 +143,14 @@ class DomainPermissionHandler extends ManageHandler {
|
||||
const roles = {};
|
||||
delete this.request.body.csrfToken;
|
||||
for (const role in this.request.body) {
|
||||
console.log(role, this.request.body[role]);
|
||||
const perms = this.request.body[role] instanceof Array
|
||||
? this.request.body[role]
|
||||
: [this.request.body[role]];
|
||||
// @ts-ignore
|
||||
roles[role] = 0n;
|
||||
// @ts-ignore
|
||||
for (const r of perms) roles[role] += 1n << BigInt(r);
|
||||
for (const r of perms) roles[role] |= 1n << BigInt(r);
|
||||
}
|
||||
await domain.setRoles(domainId, roles);
|
||||
this.back();
|
||||
|
||||
Reference in new issue
Block a user