MM-14412: Enables force removals of team/channel members base on group constraints. (#10490)

* MM-14412: Enables force removals of team/channel members base on group constraints.

* Renames some existing methods and variables.

* Change return types to ChannelMembers and TeamMembers for some existing methods.

* Adds option to change LDAP_DATA to either 'qa' or 'test' with env variable.

* Adds methods to retrieve ChannelMembers and TeamMembers that, based on group constraints, should be deleted.

* Adds helper functions to create GroupTeams and GroupChannels.

* MM-14412: Switches to helper methods for GroupSyncable creation in test files.

* MM-14412: Style fix.

* MM-14412: Switches remaining GroupSyncable instances to be created with helper functions.

* MM-14412: Typo fix.

* MM-11412: Build fixes.

* MM-14412: Checks if user is team member before re-adding.

* MM-14412: Update for change of GroupConstrained fields type.
Этот коммит содержится в:
Martin Kraft
2019-04-02 09:22:50 -04:00
коммит произвёл GitHub
родитель cee65379c7
Коммит 25fd962016
23 изменённых файлов: 1212 добавлений и 607 удалений

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

@@ -108,6 +108,7 @@ pipeline {
MM_EMAILSETTINGS_SMTPSERVER = "inbucket"
MM_EMAILSETTINGS_SMTPPORT = "10025"
MM_ELASTICSEARCHSETTINGS_CONNECTIONURL = "http://elasticsearch:9200"
LDAP_DATA = "test"
}
steps {
@@ -116,8 +117,7 @@ pipeline {
sh """
docker-compose --no-ansi run --rm start_dependencies
docker-compose --no-ansi ps
docker-compose --no-ansi exec -T openldap bash -c 'ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest -f /add-users.ldif';
docker-compose --no-ansi exec -T openldap bash -c 'ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest -f /add-groups.ldif';
docker-compose --no-ansi exec -T openldap bash -c 'ldapadd -x -D "cn=admin,dc=mm,dc=test,dc=com" -w mostest -f /${LDAP_DATA}-data.ldif';
"""
}
}

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

@@ -48,8 +48,8 @@ services:
LDAP_DOMAIN: "mm.test.com"
LDAP_ADMIN_PASSWORD: "mostest"
volumes:
- "../tests/add-users.ldif:/add-users.ldif"
- "../tests/add-groups.ldif:/add-groups.ldif"
- "../tests/test-data.ldif:/test-data.ldif"
- "../tests/qa-data.ldif:/qa-data.ldif"
elasticsearch:
image: "mattermost/mattermost-elasticsearch-docker:6.5.1"
networks: