MM-15162: Changes for LDAP groups removals. (#10701)

* MM-15162: Changes for LDAP groups removals phase.

* MM-15162: Adds missing translation.

* MM-15162: Fixes tests.

* MM-15162: Removes some confusing branching.

* MM-15162: Make permission less restrictive.

* MM-15162: Moves counting to the DB tier.

* MM-15162: Moves CountGroupsByTeam into own store method.

* MM-15162: Adds count to tests.

* MM-15162: Fix for wrong cast type.

* MM-15162: Fix for possible null SchemeGuest column.

* MM-15162: Fixes bug whereby permissions error didn't return.

* MM-15162: Changes for LDAP groups removals phase.

* MM-15162: Adds missing translation.

* MM-15162: Fixes tests.

* MM-15162: Removes some confusing branching.

* MM-15162: Make permission less restrictive.

* MM-15162: Moves counting to the DB tier.

* MM-15162: Moves CountGroupsByTeam into own store method.

* MM-15162: Adds count to tests.

* MM-15162: Fix for wrong cast type.

* MM-15162: Fix for possible null SchemeGuest column.

* MM-15162: Fixes bug whereby permissions error didn't return.

* MM-15162: Adds missing translation blocking enterprise build.

* MM-15162: Update to group commands.
Этот коммит содержится в:
Martin Kraft
2019-05-10 11:47:21 -04:00
коммит произвёл GitHub
родитель 74c7c46a7d
Коммит 480fffd3cc
24 изменённых файлов: 1001 добавлений и 146 удалений

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

@@ -40,6 +40,7 @@ type Group struct {
UpdateAt int64 `json:"update_at"`
DeleteAt int64 `json:"delete_at"`
HasSyncables bool `db:"-" json:"has_syncables"`
MemberCount *int `db:"-" json:"member_count,omitempty"`
}
type GroupPatch struct {
@@ -48,12 +49,24 @@ type GroupPatch struct {
Description *string `json:"description"`
}
type GroupSearchOpts struct {
type LdapGroupSearchOpts struct {
Q string
IsLinked *bool
IsConfigured *bool
}
type GroupSearchOpts struct {
Q string
NotAssociatedToTeam string
IncludeMemberCount bool
PageOpts *PageOpts
}
type PageOpts struct {
Page int
PerPage int
}
func (group *Group) Patch(patch *GroupPatch) {
if patch.Name != nil {
group.Name = *patch.Name