Skip to content

Commit 25673a9

Browse files
committed
Code cleanup
Related: #18466 (review) Author-Change-Id: IB#1105051
1 parent cda4a8a commit 25673a9

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

models/user/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ func validateUser(u *User) error {
830830
// updateUserAllowed is used to block updating selected user fields when local user managemement is disabled.
831831
func updateUserAllowed(u *User) error {
832832
// Don't allow changes of selected user fields if local user management is disabled.
833-
if setting.Service.DisableLocalUserManagement && (u.Type == UserTypeIndividual) {
833+
if setting.Service.DisableLocalUserManagement && u.Type == UserTypeIndividual {
834834
if currUser, err := GetUserByID(u.ID); err == nil {
835835
if currUser.Name != u.Name {
836836
return fmt.Errorf("cannot change user %s username; local user management disabled", u.Name)

routers/web/admin/emails.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ func isKeywordValid(keyword string) bool {
118118

119119
// ActivateEmail serves a POST request for activating/deactivating a user's email
120120
func ActivateEmail(ctx *context.Context) {
121-
122121
// Don't allow to activate/deactivate emails if local user management is disabled.
123122
if setting.Service.DisableLocalUserManagement {
124123
ctx.ServerError("ActivateEmail", fmt.Errorf("cannot activate email; local user management disabled"))

0 commit comments

Comments
 (0)