core: allow setting priv_default

This commit is contained in:
undefined committed 2021-03-21 18:22:15 +08:00
1 parent 4a34a91848
commit 3aadb9511d
5 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -195,7 +195,7 @@ class UserModel {
@ArgMethod
static async create(
mail: string, uname: string, password: string,
uid: number = 0, regip: string = '127.0.0.1', priv: number = PRIV.PRIV_DEFAULT,
uid: number = 0, regip: string = '127.0.0.1', priv: number = system.get('default.priv'),
) {
const salt = String.random();
if (!uid) uid = await system.inc('user');