mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core&ui: add allow invite option
This commit is contained in:
3 files changed
+3
-2
No files matched your search
@@ -175,7 +175,7 @@ class DomainUserHandler extends ManageHandler {
|
||||
@param('role', Types.Role)
|
||||
@param('join', Types.Boolean)
|
||||
async postSetUsers(domainId: string, uid: number[], role: string, join = false) {
|
||||
if (join) this.checkPriv(PRIV.PRIV_MANAGE_ALL_DOMAIN);
|
||||
if (join && !system.get('server.allowInvite')) this.checkPriv(PRIV.PRIV_MANAGE_ALL_DOMAIN);
|
||||
await Promise.all([
|
||||
domain.setUserRole(domainId, uid, role),
|
||||
oplog.log(this, 'domain.setRole', { uid, role, join }),
|
||||
|
||||
@@ -314,6 +314,7 @@ SystemSetting(Schema.object({
|
||||
verify: Schema.boolean().default(true).description('Verify register email'),
|
||||
}).extra('family', 'setting_smtp'),
|
||||
server: Schema.object({
|
||||
allowInvite: Schema.boolean().default(true).description('Allow invite users'),
|
||||
center: Schema.string().default('https://hydro.ac/center').description('Server Center').role('url').hidden(),
|
||||
name: Schema.string().default('Hydro').description('Server Name'),
|
||||
url: Schema.string().default('/').description('Server BaseURL'),
|
||||
|
||||
Reference in new issue
Block a user