forked from kevadesu/forgejo
Apply DefaultUserIsRestricted in CreateUser
This commit is contained in:
parent
7b4c3c7bb1
commit
9020faa3ce
3 changed files with 12 additions and 13 deletions
|
@ -867,14 +867,13 @@ func SignInOAuthCallback(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
u = &user_model.User{
|
||||
Name: getUserName(&gothUser),
|
||||
FullName: gothUser.Name,
|
||||
Email: gothUser.Email,
|
||||
IsActive: !setting.OAuth2Client.RegisterEmailConfirm,
|
||||
LoginType: auth.OAuth2,
|
||||
LoginSource: authSource.ID,
|
||||
LoginName: gothUser.UserID,
|
||||
IsRestricted: setting.Service.DefaultUserIsRestricted,
|
||||
Name: getUserName(&gothUser),
|
||||
FullName: gothUser.Name,
|
||||
Email: gothUser.Email,
|
||||
IsActive: !setting.OAuth2Client.RegisterEmailConfirm,
|
||||
LoginType: auth.OAuth2,
|
||||
LoginSource: authSource.ID,
|
||||
LoginName: gothUser.UserID,
|
||||
}
|
||||
|
||||
setUserGroupClaims(authSource, u, &gothUser)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue