[PLT-7794] Add user access token enable/disable endpoints (#7630)
* Add column to UserAccessTokens table * PLT-7794 Add user access token enable/disable endpoints * replaced eliminated global variable * updates to user_access_token_store and upgrade.go * style fix and cleanup
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
8e19ba029f
Коммит
7fa4913f90
@@ -14,6 +14,7 @@ type UserAccessToken struct {
|
||||
Token string `json:"token,omitempty"`
|
||||
UserId string `json:"user_id"`
|
||||
Description string `json:"description"`
|
||||
IsActive bool `json:"is_active"`
|
||||
}
|
||||
|
||||
func (t *UserAccessToken) IsValid() *AppError {
|
||||
@@ -38,6 +39,7 @@ func (t *UserAccessToken) IsValid() *AppError {
|
||||
|
||||
func (t *UserAccessToken) PreSave() {
|
||||
t.Id = NewId()
|
||||
t.IsActive = true
|
||||
}
|
||||
|
||||
func (t *UserAccessToken) ToJson() string {
|
||||
|
||||
Ссылка в новой задаче
Block a user