SQLStore: allow to look for is_disabled flag (#18032)

* Add support for `is_disabled` to `CreateUser()`

* Add support for `is_disabled` to `SearchUsers()`
  Had to add it as a `string` type not as `bool`, since if that's property
  is omitted, we would have add it to SQL request, which might be dangerous

* Restructure desctructive tests and add more

(cherry picked from commit 8e0f091f14)
This commit is contained in:
Oleg Gaidarenko
2019-07-26 15:56:18 +02:00
committed by Leonard Gram
parent 3d7c52dcd1
commit ae04813045
3 changed files with 192 additions and 31 deletions
+5
View File
@@ -62,6 +62,7 @@ type CreateUserCommand struct {
Password string
EmailVerified bool
IsAdmin bool
IsDisabled bool
SkipOrgSetup bool
DefaultOrgRole string
@@ -146,6 +147,10 @@ type SearchUsersQuery struct {
Limit int
AuthModule string
// We have to use string not bool, since there is cases when
// we don't care if user is disabled or not
IsDisabled string
Result SearchUserQueryResult
}