Commit Graph

64 Commits

Author SHA1 Message Date
Martin Kraft
6f31d90e2f Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2 2018-05-17 07:53:16 -04:00
Joram Wilander
1f6c271b3b MM-8708 Remove api package (#8784)
* Remove api package

* Remove api dependency from cmd package

* Remove EnableAPIv3 setting

* Update web tests

* Add more websocket tests

* Move some ws and oauth tests to api4 package

* Move command tests into api4 package

* Test fixes

* Fix msg command test

* Add some app file tests
2018-05-16 13:43:22 -04:00
Martin Kraft
f82cc7896d Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-2 2018-05-15 07:45:28 -04:00
Joram Wilander
6a9aa855d1 Move SAML endpoints out of api package (#8780) 2018-05-14 11:27:30 -04:00
Joram Wilander
47250c6629 Refactor context out of API packages (#8755)
* Refactor context out of API packages

* Update function names per feedback

* Move webhook handlers to web and fix web tests

* Move more webhook tests out of api package

* Fix static handler
2018-05-14 10:24:58 -04:00
George Goldberg
60cf74352f MM-10140: API Implementation for Schemes related Endpoints (#8615)
* Implement basic scheme CRUD endpoints.

* Get All Schemes (Paged) Endpoint and store plumbing.

* Add get teams/channels for schemes.

* Fix unit tests.

* Review fixes.

* More review fixes.
2018-05-03 09:00:26 -04:00
Christopher Speller
686c2fbab7 Structured logging (#8673)
* Implementing structured logging

* Changes to en.json to allow refactor to run.

* Fixing global logger

* Structured logger initalization.

* Add caller.

* Do some log redirection.

* Auto refactor

* Cleaning up l4g reference and removing dependancy.

* Removing junk.

* Copyright headers.

* Fixing tests

* Revert "Changes to en.json to allow refactor to run."

This reverts commit fd8249e99b.

* Fixing some auto refactor strangeness and typo.

* Making keys more human readable.
2018-04-27 12:49:45 -07:00
George Goldberg
5c101253c5 Merge branch 'master' into advanced-permissions-phase-1 2018-02-13 13:46:01 +00:00
Chris
0daac7e4fc Add /v4/image api (#8230)
* add image api

* i suppose i should add a test...

* only redirect to image proxy
2018-02-09 11:56:11 -08:00
George Goldberg
e1cd646135 XYZ-37: Advanced Permissions Phase 1 Backend. (#8159)
* XYZ-13: Update Permission and Role structs to new design.

* XYZ-10: Role store.

* XYZ-9/XYZ-44: Roles API endpoints and WebSocket message.

* XYZ-8: Switch server permissions checks to store backed roles.

* XYZ-58: Proper validation of roles where required.

* XYZ-11/XYZ-55: Migration to store backed roles from policy config.

* XYZ-37: Update unit tests to work with database roles.

* XYZ-56: Remove the "guest" role.

* Changes to SetDefaultRolesFromConfig.

* Short-circuit the store if nothing has changed.

* Address first round of review comments.

* Address second round of review comments.
2018-02-06 15:34:08 +00:00
Joram Wilander
3918ed6c58 Add GET /emojis/name/{emoji_name} API endpoint (#8142) 2018-01-24 08:50:11 -05:00
Joram Wilander
4f4a765e7d ABC-90 Add POST /emoji/search and GET /emoji/autocomplete API endpoints (#8125)
* Add POST /emoji/search and GET /emoji/autocomplete API endpoints

* Add constant to be clearer
2018-01-23 08:04:44 -08:00
Jesús Espino
dd9ad10d70 [PLT-6936] Translate AppError.Message automatically by default (#8063) 2018-01-08 13:13:24 -05:00
Chris
5cf45d2155 refactor template code (#7860) 2017-11-20 12:57:45 -05:00
Chris
bff2b5e735 Miscellaneous app cleanup (#7594)
* app cleanup

* whoops, forgot a file

* some minor cleanup

* longer container deadline

* defensive checks
2017-10-09 14:59:48 -07:00
George Goldberg
76bd1bb212 PLT-7705: API to get data retention policy. (#7539)
* PLT-7705: API to get data retention policy.

* Fix review comments.
2017-10-02 12:43:21 +01:00
Chris
8c80cdde38 remove remaining Global() calls (outside of tests) (#7521) 2017-09-28 00:52:34 +08:00
Chris
dcf9e96a0b remove global refs from api/api4 (#7496) 2017-09-22 13:54:27 -04:00
Chris
266ff86702 remove more global refs (#7480) 2017-09-21 10:13:34 +01:00
Chris
b066b6df13 Remove global app references (#7433)
* remove global app references

* test fix

* fix api4 test compilation
2017-09-12 09:19:52 -05:00
Chris
402491b7e5 PLT-7407: Back-end plugins (#7409)
* tie back-end plugins together

* fix comment typo

* add tests and a bit of polish

* tests and polish

* add test, don't let backend executable paths escape the plugin directory
2017-09-11 10:02:02 -05:00
Christopher Speller
29fca51821 Renaming repo 2017-09-06 23:11:59 -07:00
Chris
1adfd0e9be app type transition (#7167) 2017-09-06 17:12:54 -05:00
Joram Wilander
899ab31fff Implement experimental REST API endpoints for plugins (#7279)
* Implement experimental REST API endpoints for plugins

* Updates per feedback and rebase

* Update tests

* Further updates

* Update extraction of plugins

* Use OS temp dir for plugins instead of search path

* Fail extraction on paths that attempt to traverse upward

* Update pluginenv ActivePlugins()
2017-09-01 09:00:27 -04:00
George Goldberg
63b10be020 APIv4: NewLocAppError -> NewAppError (#7328) 2017-08-31 10:03:16 -04:00
Chris
b122381e87 PLT-1649: add response_url support for custom slash commands (#6739)
* add response_url support for custom slash commands

* pr suggestions

* pr update / suggestion

* test fix
2017-08-16 08:17:57 -04:00
George Goldberg
f2898927f1 PLT-6474: Server: Add elasticsearch/test endpoint to API. (#6792) 2017-06-29 17:40:14 -04:00
Harrison Healey
577ed27f1b PLT-6408 Framework for job server (#6404)
* Added initial job server

* Added job server to be ran as part of platform

* Added test job to the enterprise repo

* Fixed job server not loading license

* Renamed job package to jobs

* Fixed TE not being buildable

* Added JobStatus table to database

* Changed fields used by JobStatus

* Added APIs to query job status

* Added config change listener to server

* Added option to run job server from Makefile

* Added ability to enable/disable jobs from config

* Commented out placeholder for search indexing job

* Fixed govet

* Removed debug messages and fixed job api init message
2017-05-18 15:05:57 -04:00
Carlos Tadeu Panato Junior
16581ae431 implement open graph metadata for apiV4 (#6343) 2017-05-10 11:44:18 +01:00
Saturnino Abril
6fa7082833 fix reaction's name validation with + sign in it (#6221) 2017-04-26 10:11:32 -04:00
Saturnino Abril
ecb10ed62f APIv4 DELETE /users/{user_id}/posts/{post_id}/reactions/name (#6117)
* APIv4 DELETE /users/{user_id}/posts/{post_id}/reactions/name

* updated v3 deleteReaction endpoint

* update parameter of app.DeleteReactionForPost()

* update utils.IsValidAlphaNum, add utils.IsValidAlphaNumHyphenUnderscore, and add related tests
2017-04-22 08:52:03 -04:00
Joram Wilander
be9624e2ad Implement v4 endpoints for OAuth (#6040)
* Implement POST /oauth/apps endpoint for APIv4

* Implement GET /oauth/apps endpoint for APIv4

* Implement GET /oauth/apps/{app_id} and /oauth/apps/{app_id}/info endpoints for APIv4

* Refactor API version independent oauth endpoints

* Implement DELETE /oauth/apps/{app_id} endpoint for APIv4

* Implement /oauth/apps/{app_id}/regen_secret endpoint for APIv4

* Implement GET /user/{user_id}/oauth/apps/authorized endpoint for APIv4

* Implement POST /oauth/deauthorize endpoint
2017-04-20 09:55:02 -04:00
Harrison Healey
1a0f8d1b3c PLT-1384 Added websocket event when preferences are updated/deleted (#6107) 2017-04-20 13:57:31 +01:00
Saturnino Abril
d2b86f1b8d APIv4 POST /reactions (#6092)
* APIv4 POST /reactions

* update corresponding V3 endpoint
2017-04-18 16:15:15 -04:00
Joram Wilander
74ffb6f98f Implement GET /webrtc/token endpoint for APIv4 (#6046) 2017-04-16 21:14:31 -04:00
Harrison Healey
fb6f2a123c PLT-5860 Updated copyright date (#6058)
* PLT-5860 Updated copyright date in about modal

* PLT-5860 Updated copyright notice in JSX files

* PLT-5860 Updated copyright notice in go files

* Fixed misc copyright dates

* Fixed component snapshots
2017-04-12 08:27:57 -04:00
Saturnino Abril
e841d0c502 APIv4 GET /posts/{post_id}/reactions (#6047) 2017-04-11 14:14:33 +01:00
Carlos Tadeu Panato Junior
48d9099882 implement POST /emoji for apiV4 (#5868) 2017-04-06 11:15:57 -04:00
Saturnino Abril
d8b732a488 APIv4 GET /users/{user_id}/posts/flagged (#5984)
* APIv4 GET /users/{user_id}/posts/flagged

* change permission check
2017-04-05 16:18:23 -04:00
Joram Wilander
daca0d93f6 Move WebSocket API to it's own package and add websocket v4 endpoint (#5881) 2017-03-28 09:58:19 +01:00
Joram Wilander
ea74613444 Implement some team endpoints for APIv4 (#5870)
* Implement GET /users/{user_id}/teams/members endpoint for APIv4

* Implement DELETE /teams/{team_id}/members/{user_id} endpoint for APIv4
2017-03-25 03:38:24 -03:00
Carlos Tadeu Panato Junior
5bf6ae04df [APIV4] GET /users/{user_id}/status - user status endpoint for apiV4 (#5824) 2017-03-24 17:23:32 +00:00
Carlos Tadeu Panato Junior
6935e2d5ea implement POST /commands for apiv4 (#5849) 2017-03-23 19:42:32 -04:00
Joram Wilander
d757645c24 Implement some channel endpoints for APIv4 (#5767) 2017-03-16 11:58:33 -07:00
Joram Wilander
ad0ed008fe Implement brand image endpoints for APIv4 (#5733)
* Implement brand image endpoints for APIv4

* Fix unit test
2017-03-14 09:35:48 -04:00
Joram Wilander
ee457176bd Implement admin LDAP endpoints for APIv4 (#5720) 2017-03-14 08:43:40 -04:00
Saturnino Abril
aafc63933a APIv4: GET /files/{file_id}/public (#5665) 2017-03-13 17:13:48 -04:00
Joram Wilander
59d06b5c56 Implement GET /cluster/status endpoint for APIv4 (#5732) 2017-03-13 12:49:19 -04:00
Joram Wilander
3ebfb36953 Implement compliance endpoints for APIv4 (#5683)
* Implement compliance endpoints for APIv4

* Add paging to get reports endpoint
2017-03-13 10:14:16 -04:00
Joram Wilander
a284cd8c18 Implement some team endpoints for APIv4 (#5745)
* Implement PUT /teams/{team_id} endpoint for APIv4

* Implement GET /users/{user_id}/teams/{team_id}/unread endpoint for APIv4

* Implement POST /teams/{team_id}/members/ids endpoint for APIv4

* Remove debug statement
2017-03-13 09:46:28 -04:00