MM-25014 - Default Group Name to null, until AllowGroupReference is set (#14651)

* make Group.Name a pointer to allow null

* fix unit tests

* fix build error

* fix unit test

* ensure Name field not nil

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Scott Bishel
2020-05-26 19:21:29 -06:00
коммит произвёл GitHub
родитель 91f010b8b7
Коммит ebece6c23a
16 изменённых файлов: 204 добавлений и 208 удалений

Просмотреть файл

@@ -194,11 +194,9 @@ func linkLdapGroup(c *Context, w http.ResponseWriter, r *http.Request) {
} else {
// Group has never been linked
//
// TODO: In a future phase of LDAP groups sync `Name` will be used for at-mentions and will be editable on
// the front-end so it will not have an initial value of `model.NewId()` but rather a slugified version of
// the LDAP group name with an appended duplicate-breaker.
// For group mentions implementation, the Name column will no longer be set by default.
// Instead it will be set and saved in the web app when Group Mentions is enabled.
newGroup := &model.Group{
Name: model.NewId(),
DisplayName: displayName,
RemoteId: ldapGroup.RemoteId,
Source: model.GroupSourceLdap,