PLT-4155 Show correct login method in system console (#4102)
* PLT-4155 Show correct login method in system console * Remove checking for system admin privileges in getProfiles
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
45ca052482
Коммит
caeadde2f2
@@ -2518,6 +2518,7 @@ func sanitizeProfile(c *Context, user *model.User) *model.User {
|
|||||||
if HasPermissionToContext(c, model.PERMISSION_MANAGE_SYSTEM) {
|
if HasPermissionToContext(c, model.PERMISSION_MANAGE_SYSTEM) {
|
||||||
options["email"] = true
|
options["email"] = true
|
||||||
options["fullname"] = true
|
options["fullname"] = true
|
||||||
|
options["authservice"] = true
|
||||||
}
|
}
|
||||||
c.Err = nil
|
c.Err = nil
|
||||||
|
|
||||||
|
|||||||
@@ -232,13 +232,15 @@ func (u *User) Sanitize(options map[string]bool) {
|
|||||||
if len(options) != 0 && !options["passwordupdate"] {
|
if len(options) != 0 && !options["passwordupdate"] {
|
||||||
u.LastPasswordUpdate = 0
|
u.LastPasswordUpdate = 0
|
||||||
}
|
}
|
||||||
|
if len(options) != 0 && !options["authservice"] {
|
||||||
|
u.AuthService = ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *User) ClearNonProfileFields() {
|
func (u *User) ClearNonProfileFields() {
|
||||||
u.Password = ""
|
u.Password = ""
|
||||||
u.AuthData = new(string)
|
u.AuthData = new(string)
|
||||||
*u.AuthData = ""
|
*u.AuthData = ""
|
||||||
u.AuthService = ""
|
|
||||||
u.MfaActive = false
|
u.MfaActive = false
|
||||||
u.MfaSecret = ""
|
u.MfaSecret = ""
|
||||||
u.EmailVerified = false
|
u.EmailVerified = false
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user