mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-06 20:21:01 +01:00
fix(users): fixed first install meanTorrent and first register user`s admin roles
This commit is contained in:
@@ -235,6 +235,7 @@ UserSchema.pre('save', function (next) {
|
||||
|
||||
if (count === 0) {
|
||||
user.roles = ['admin'];
|
||||
updateOperAdminFlag(user);
|
||||
}
|
||||
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user