MM-62760 - Allow Team Admins to view team email (#30170)
* allow team admins to view team email. * Update server/channels/api4/team_test.go Co-authored-by: Caleb Roseland <caleb@calebroseland.com> --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Caleb Roseland <caleb@calebroseland.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
09ff43acc6
Коммит
806fce3030
@@ -421,10 +421,6 @@ func regenerateTeamInviteId(c *Context, w http.ResponseWriter, r *http.Request)
|
||||
|
||||
c.App.SanitizeTeam(*c.AppContext.Session(), patchedTeam)
|
||||
|
||||
if !*c.App.Config().PrivacySettings.ShowEmailAddress && !c.IsSystemAdmin() {
|
||||
patchedTeam.Email = ""
|
||||
}
|
||||
|
||||
auditRec.Success()
|
||||
auditRec.AddEventResultState(patchedTeam)
|
||||
auditRec.AddEventObjectType("team")
|
||||
@@ -492,12 +488,6 @@ func getTeamsForUser(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
c.App.SanitizeTeams(*c.AppContext.Session(), teams)
|
||||
|
||||
if !*c.App.Config().PrivacySettings.ShowEmailAddress && !c.IsSystemAdmin() {
|
||||
for _, team := range teams {
|
||||
team.Email = ""
|
||||
}
|
||||
}
|
||||
|
||||
js, err := json.Marshal(teams)
|
||||
if err != nil {
|
||||
c.Err = model.NewAppError("getTeamsForUser", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(err)
|
||||
|
||||
Ссылка в новой задаче
Block a user