mirror of
https://github.com/mattermost/focalboard.git
synced 2025-01-08 15:06:08 +02:00
Removed unused fields (#1944)
* removed unused fields * lint fix Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
This commit is contained in:
parent
dc36afcfba
commit
6b23795ff3
@ -114,7 +114,7 @@ func TestGetMe(t *testing.T) {
|
|||||||
me, resp := th.Client.GetMe()
|
me, resp := th.Client.GetMe()
|
||||||
require.NoError(t, resp.Error)
|
require.NoError(t, resp.Error)
|
||||||
require.NotNil(t, me)
|
require.NotNil(t, me)
|
||||||
require.Equal(t, registerRequest.Email, me.Email)
|
require.Equal(t, "", me.Email)
|
||||||
require.Equal(t, registerRequest.Username, me.Username)
|
require.Equal(t, registerRequest.Username, me.Username)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ type User struct {
|
|||||||
|
|
||||||
// The user's email
|
// The user's email
|
||||||
// required: true
|
// required: true
|
||||||
Email string `json:"email"`
|
Email string `json:"-"`
|
||||||
|
|
||||||
// swagger:ignore
|
// swagger:ignore
|
||||||
Password string `json:"-"`
|
Password string `json:"-"`
|
||||||
|
@ -283,8 +283,8 @@ func (s *MattermostAuthLayer) getQueryBuilder() sq.StatementBuilderType {
|
|||||||
|
|
||||||
func (s *MattermostAuthLayer) GetUsersByWorkspace(workspaceID string) ([]*model.User, error) {
|
func (s *MattermostAuthLayer) GetUsersByWorkspace(workspaceID string) ([]*model.User, error) {
|
||||||
query := s.getQueryBuilder().
|
query := s.getQueryBuilder().
|
||||||
Select("id", "username", "email", "password", "MFASecret as mfa_secret", "AuthService as auth_service", "COALESCE(AuthData, '') as auth_data",
|
Select("id", "username", "props",
|
||||||
"props", "Users.CreateAt as create_at", "Users.UpdateAt as update_at", "Users.DeleteAt as delete_at", "b.UserId IS NOT NULL AS is_bot").
|
"Users.CreateAt as create_at", "Users.UpdateAt as update_at", "Users.DeleteAt as delete_at", "b.UserId IS NOT NULL AS is_bot").
|
||||||
From("Users").
|
From("Users").
|
||||||
Join("ChannelMembers ON ChannelMembers.UserID = Users.ID").
|
Join("ChannelMembers ON ChannelMembers.UserID = Users.ID").
|
||||||
LeftJoin("Bots b ON ( b.UserId = Users.ID )").
|
LeftJoin("Bots b ON ( b.UserId = Users.ID )").
|
||||||
@ -315,11 +315,6 @@ func (s *MattermostAuthLayer) usersFromRows(rows *sql.Rows) ([]*model.User, erro
|
|||||||
err := rows.Scan(
|
err := rows.Scan(
|
||||||
&user.ID,
|
&user.ID,
|
||||||
&user.Username,
|
&user.Username,
|
||||||
&user.Email,
|
|
||||||
&user.Password,
|
|
||||||
&user.MfaSecret,
|
|
||||||
&user.AuthService,
|
|
||||||
&user.AuthData,
|
|
||||||
&propsBytes,
|
&propsBytes,
|
||||||
&user.CreateAt,
|
&user.CreateAt,
|
||||||
&user.UpdateAt,
|
&user.UpdateAt,
|
||||||
|
Loading…
Reference in New Issue
Block a user