mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: new domain_join logic
This commit is contained in:
1 parent
706a9a0928
commit
7fd01715bc
9 files changed
+81
-39
No files matched your search
@@ -207,6 +207,7 @@ class DomainModel {
|
||||
let dudoc = await collUser.findOne({ domainId, uid: udoc._id });
|
||||
dudoc ||= { domainId, uid: udoc._id };
|
||||
if (!(udoc.priv & PRIV.PRIV_USER_PROFILE)) dudoc.role = 'guest';
|
||||
if (!dudoc.join) dudoc.role = 'guest';
|
||||
if (udoc.priv & PRIV.PRIV_MANAGE_ALL_DOMAIN) dudoc.role = 'root';
|
||||
dudoc.role ||= 'default';
|
||||
const ddoc = await DomainModel.get(domainId);
|
||||
|
||||
Reference in new issue
Block a user