PLT-6763 Implement user access tokens and new roles (server-side) (#6972)

* Implement user access tokens and new roles

* Update config.json

* Add public post permission to apiv3

* Remove old comment

* Fix model unit test

* Updates to store per feedback

* Updates per feedback from CS
This commit is contained in:
Joram Wilander
2017-07-31 12:59:32 -04:00
committed by GitHub
parent ed62660e96
commit 59992ae4a4
25 changed files with 1378 additions and 44 deletions

View File

@@ -49,6 +49,7 @@ type Store interface {
FileInfo() FileInfoStore
Reaction() ReactionStore
Job() JobStore
UserAccessToken() UserAccessTokenStore
MarkSystemRanUnitTests()
Close()
DropAllTables()
@@ -398,3 +399,12 @@ type JobStore interface {
GetAllByStatus(status string) StoreChannel
Delete(id string) StoreChannel
}
type UserAccessTokenStore interface {
Save(token *model.UserAccessToken) StoreChannel
Delete(tokenId string) StoreChannel
DeleteAllForUser(userId string) StoreChannel
Get(tokenId string) StoreChannel
GetByToken(tokenString string) StoreChannel
GetByUser(userId string, page, perPage int) StoreChannel
}