Skip to content

Commit 3b44082

Browse files
authored
simplify code and remove comment regarding future investigation (#1730)
1 parent 139636c commit 3b44082

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

server/app/playbook_run_service.go

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,23 +1324,18 @@ func (s *PlaybookRunServiceImpl) GetOwners(requesterInfo RequesterInfo, options
13241324
return nil, errors.Wrap(err, "can't get owners from the store")
13251325
}
13261326

1327-
// ShowFullName is coming as nil when setting is set to false
1328-
// TODO: further investigation https://mattermost.atlassian.net/browse/MM-48464
1329-
var showFullName bool
1327+
// System admin can see fullname no matter the settings
13301328
if IsSystemAdmin(requesterInfo.UserID, s.pluginAPI) {
1331-
showFullName = true
1332-
} else {
1333-
cfg := s.pluginAPI.Configuration.GetConfig()
1334-
if cfg.PrivacySettings.ShowFullName != nil {
1335-
showFullName = *cfg.PrivacySettings.ShowFullName
1336-
}
1329+
return owners, nil
13371330
}
1338-
1331+
// If setting is not nil, means that ShowFullName is true
1332+
if s.pluginAPI.Configuration.GetConfig().PrivacySettings.ShowFullName != nil {
1333+
return owners, nil
1334+
}
1335+
// Remove names otherwise
13391336
for k, o := range owners {
1340-
if !showFullName {
1341-
o.FirstName = ""
1342-
o.LastName = ""
1343-
}
1337+
o.FirstName = ""
1338+
o.LastName = ""
13441339
owners[k] = o
13451340
}
13461341
return owners, nil

0 commit comments

Comments
 (0)