Add default user to allow for default groups and IAM
This commit is contained in:
@@ -91,6 +91,7 @@ class AuthController extends Controller {
|
||||
if ( !(await User.findOne()) ) user.promote('root')
|
||||
|
||||
await user.save()
|
||||
await user.grant_defaults()
|
||||
|
||||
// Log in the user automatically
|
||||
await this.auth.get_provider().session(req, user)
|
||||
@@ -321,6 +322,7 @@ class AuthController extends Controller {
|
||||
|
||||
await user.reset_password(req.body.password, 'create')
|
||||
await user.save()
|
||||
await user.grant_defaults()
|
||||
return res.api(await user.to_api())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user