ui: add force join using admin privileges

This commit is contained in:
undefined committed 2025-08-11 09:55:08 +08:00
1 parent 5ba1188d50
commit f4f5e7c9a5
4 files changed
+106 -138

No files matched your search

+5 -2
View File
@@ -173,11 +173,14 @@ class DomainUserHandler extends ManageHandler {
@requireSudo
@param('uids', Types.NumericArray)
@param('role', Types.Role)
async postSetUsers(domainId: string, uid: number[], role: string) {
@param('join', Types.Boolean)
async postSetUsers(domainId: string, uid: number[], role: string, join = false) {
if (join) this.checkPriv(PRIV.PRIV_MANAGE_ALL_DOMAIN);
await Promise.all([
domain.setUserRole(domainId, uid, role),
oplog.log(this, 'domain.setRole', { uid, role }),
oplog.log(this, 'domain.setRole', { uid, role, join }),
]);
if (join) await domain.setJoin(domainId, uid, true);
this.back();
}