summaryrefslogtreecommitdiffstats
path: root/api4/user.go
Commit message (Collapse)AuthorAgeFilesLines
* MM-12234: configurable limit to user autocomplete and search matches (#9499)Jesse Hallam2018-10-171-24/+35
| | | | | | | | | | * unit test cleanup * allow limiting user search results * clean up test users before starting * model UserSearchOptions to simplify parameters
* Refactored to rename "service terms" to "terms of service" (#9581)Harshil Sharma2018-10-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * #124 renamed identififers from service terms to terms of service * #124 renamed identififers from service terms to terms of service * 124 renamed ServiceTerms model to TermsOfService * 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService * 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService * #124 fixed formatting * #124 fixed formatting * #132 renamed table ServiceTerms to TermsOfService * #124 renamed some missed files from 'service_terms' to 'terms_of_service' * #124 removed fixed TODOs * drop migrate of ServiceTerms table, since backporting * s/ServiceTerms/TermsOfService/ in tests * s/AcceptedServiceTermsId/AcceptedTermsOfServiceId/ Change the model attribute, even though the column name will eventually be removed. * s/accepted_service_terms_id/accepted_terms_of_service_id/ to match redux * s/serviceTerms/termsOfService * rename column too, and add max size constraint * s/EnableCustomServiceTerms/EnableCustomTermsOfService
* MM-12519: simplify autocomplete team id checking (#9577)Jesse Hallam2018-10-091-17/+10
| | | This handles clients sending a team id in a direct message or group channel autocomplete, when it necessarily won't match. Just verify that the user has permission for the team in question, whenever it is provided.
* MM-12067: Add SetDefaultProfileImage to reset the user profile image to a ↵Jesús Espino2018-10-021-0/+62
| | | | | | | | | | | | generated one (#9449) * MM-12067: Add SetDefaultProfileImage to reset the user profile image to a generated one * Allow to get the default profile image for my user * Allowing to reset the last update image date to 0 * PR reviews
* MM-12192: autocompleteUsers: if a teamId is provided, require it to match ↵Jesse Hallam2018-09-281-0/+14
| | | | | | | | the channel's team id (#9481) * MM-12192: unit test * MM-1292: autocompleteUsers: if a teamId is provided, require it to match the channel's team id
* #MM-12130 changes for custom service terms (#9450)Harshil Sharma2018-09-261-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * #MM-12130 changes for custom service terms * Fixed styling * Added getServiceTerms API * removed unnecessary panic * removed custom service terms text from flat config * reverted user sql store as those changes are no longer needed * added tests * Updated a config key to be more standard * Added copyright info * Loading service terms only if the feature is enabled * Loading service terms only if the feature is enabled * removed unused index * added createservice termns API * made a param to bool instead of string * added createservice termns API * review fixes * fixed styling * Minor refactoring * removed saveConfig and loadConfig magic * added empty service terms text check to createServiceTerms API * refactoed some urls to be terms_of_service instead of service_terms * removed check for support settings * changed URLs in tests * removed unused code * fixed a bug * added service termd id in conif * fixed a test * review fixes * minor fixes * Fixed TestCreateServiceTerms
* MM-11520: Make entity ID checks consistent across api4. (#9395)George Goldberg2018-09-141-0/+6
| | | | | | * MM-11520: Make entity ID checks consistent across api4. * Update tests.
* Migrate all the api4 to handle errors in idiomatic way (#9143)Jesús Espino2018-08-011-113/+118
|
* Do not close the connection abruptly on too big file uploads (#9083)Jesús Espino2018-07-181-0/+4
|
* MM-10980: Conditionally filteres User json properties. (#9018)Martin Kraft2018-06-291-1/+5
|
* Add missed translations (#8959)Jesús Espino2018-06-191-2/+2
|
* Prototype for CBA (#8475)Corey Hulen2018-06-121-0/+19
| | | | | | | | | | | | | | * Prototype for CBA * Fixing gofmt issues * Do not require password if logging in with certificate * Fixing issues from feedback * Adding unit tests * Fixing feedback
* Get the count of the all system users at endpoint /users/stats (#8847)lisakycho2018-06-071-0/+15
| | | | | | | | * Get the count of the all system users at endpoint /users/stats * Added GetTotalUsersStats test in api4 * Changed pluralization and added the test back.
* MM-10348 Adding experimental hardened mode. (#8881)Christopher Speller2018-06-041-6/+15
| | | | | | * Adding experimental hardened mode. * Sanitizing all 500 errors.
* [MM-1915] Add Deactivate Account - server side (#8699)Carlos Tadeu Panato Junior2018-05-281-0/+13
|
* MM-4998 Adding LoginIdAttribute to allow LDAP users to change their login ID ↵Christopher Speller2018-05-101-4/+4
| | | | | | | | | | | | | | without losing their account (#8756) * Adding LoginIdAttribute * Modifying LDAP to use loginIDAttribute. * Adding IDAttribute migration and AD objectGUID support. * Removing unused idea. * Fix typo.
* Structured logging (#8673)Christopher Speller2018-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 fd8249e99bcad0231e6ea65cd77c32aae9a54026. * Fixing some auto refactor strangeness and typo. * Making keys more human readable.
* MM-9779: Incorporate a Token into the invitations system (#8604)Jesús Espino2018-04-181-3/+3
| | | | | | | | | | | | | | | | | | | | * Incorporate a Token into the invitations system * Adding unit tests * Fixing some api4 client tests * Removing unnecesary hash validation * Change the Hash concept on invitations with tokenId * Not send invitation if it wasn't able to create the Token * Fixing some naming problems * Changing the hash query params received from the client side * Removed unneded data param in the token usage
* Handle app errors in user autocomplete endpoint (#8643)Joram Wilander2018-04-171-3/+17
|
* Fix error handling when requesting profile image for bad user ID (#8618)Joram Wilander2018-04-131-1/+2
|
* Add Auto Responder handler (#8386)Stan Chan2018-04-121-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WIP Out Of Office Return error for status command if user status is OOO Ignore notifications if Out Of Office Disable AutoResponder if status is set to online Add test for AutoResponder DisableAutoResponse when manually setting status Remove check on status slash command return early if user does not exists in SendAutoResponse method Add proper error handling Add a newline after error handling Revert back to err == nil in api4/status.go Remove a.Go when using a.Publish Add name consistency with the feature auto responder Last changes for name consistency, also fix failing test with auto_responder Fix names of functions in auto responder test Add ExperimentalEnableAutomaticReplies flag Auto Responder reply to a post
* MM-9274- Sort Users in Channel by status (#8181)Stephen Kiers2018-03-091-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sort by lastActivity * added status ordering to Users * sort offline before dnd * remove data not needed * added seperate call for when order=‘status’ is on GetUser request * remove PrintLn * styling fix * remove mistake * mistake 2 * better comment * explicit if statemnt * writing tests * removed manually added mocks * generated mock * ICU-668 Added unit tests * style fix * sort by lastActivity * added status ordering to Users * sort offline before dnd * remove data not needed * added seperate call for when order=‘status’ is on GetUser request * remove PrintLn * styling fix * remove mistake * mistake 2 * better comment * explicit if statemnt * writing tests * removed manually added mocks * generated mock * ICU-668 Added unit tests * style fix * reverse dnd and offline * Fixed app.SaveStatusAndBroadcast * Fixed incorrect merge * Fixing incorrect merge again
* Remove global site url (#8343)Chris2018-02-221-2/+1
| | | | | | | | * remove global site url * missed one * revert mysterious change
* MM-8681 Adding config settings necessary for using CloudFront. (#8307)Christopher Speller2018-02-201-0/+1
| | | | | | * Adding config settings nessisary for using CloudFront. * Adding new config settings to diagnostics.
* add App.License, remove utils.IsLicensed / utils.License calls (#8203)Chris2018-02-061-1/+1
|
* [PLT-7793] Add /users/tokens/search endpoint (#8088)Adrian Carolli2018-01-111-0/+25
| | | | | | | | * Add /users/tokens/search endpoint + tests * Fix check-style * Unnecessary deletion
* [PLT-7793] Added /users/tokens endpoint (#8038)Adrian Carolli2018-01-051-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added /users/tokens/all endpoint - UserAccessStore now has getAll method - Added tests - Added route - Added handler * Remove space fix check-style * Remove blank space check-style * Fixes for make check-style * Remove extra code that is un-needed in user_test.go * Rename endpoint + grammar - Renamed /users/tokens/all to /users/tokens - Renamed getUserAccessTokens to getUserAccessTokensForUser - Renamed getAllUserAccessTokens to getUserAccessTokens - Minor Grammar changes * Add localization for sql_user_access_token.get_all * Fix minor plural spelling
* Add admin update endpoint that can update authservice and authdata (#7842)Chris Duarte2018-01-041-0/+27
| | | | | | | | | | * add admin update endpoint that can upate authservice and authdata * Control only SystemAdmin access * Refactored AdminUpdate endpoint to only be able to update AuthData, AuthService and Password by User.Id * Refactor to move `PUT /api/v4/users/{user_id}/auth`. Created a struct to hold UserAuth info.
* Reduce logging data races, fix MySQL test race condition (#7994)Chris2017-12-221-2/+0
| | | | | | | | * fix races * revert unintentional change * fix test as intended
* Allow deactivation of SSO users (#7952)Joram Wilander2017-12-081-2/+10
|
* prevent deactivation of sso users (#7759)Chris2017-11-021-1/+1
|
* PLT-7978 Add websocket event for user role update (#7745)Joram Wilander2017-10-311-1/+1
| | | | | | | | * Add websocket event for user role update * Fix tests * More test fixes
* Refactoring cfg refs and load / save functions (#7749)Chris2017-10-311-4/+4
| | | | | | * refactoring cfg refs and load / save functions * improve error output
* Performance improvements for 40M posts (#7708)Christopher Speller2017-10-251-33/+33
| | | | | | | | | | | | | | | | | | | | | | * Optimizing get root posts SQL query * Setting session invalidation to be reliable * Adding app reciever to SessionHasPermissionToUser * Adding app reciever to SessionHasPermissionToTeam * Adding app reciever to SessionHasPermissionTo * Clear session cache if permission was denied * Fixing rebase issues * Revert "Optimizing get root posts SQL query" This reverts commit f364757e7015cfb4ec673d0a4fc3d57cd25d8dd7. * Fixing build
* [PLT-7794] Add user access token enable/disable endpoints (#7630)Nick Frazier2017-10-191-0/+76
| | | | | | | | | | | | * 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
* Reduce utils.Cfg references (#7650)Chris2017-10-181-12/+12
| | | | | | | | | | | | * app.UpdateConfig method * test fix * another test fix * the config override option as-was is just error prone, remove it for now * derp
* [PLT-7396] Add the ability to revoke user sessions in System Console > Users ↵Rick Batka2017-10-161-0/+20
| | | | | | | | #7493 (#7623) * add endpoint and tests for revoking all sessions for a user * fix failing test build
* PLT-7781 Some more OAuth fixes (#7568)Joram Wilander2017-10-041-0/+46
| | | | | | * Some other oauth fixes * Fix unit test
* Updates to session revoking in v4 (#7565)Joram Wilander2017-10-041-1/+13
|
* Only update session activity on specific endpoints (#7549)Joram Wilander2017-10-031-0/+2
|
* remove global refs from api/api4 (#7496)Chris2017-09-221-49/+49
|
* remove einterface gets (#7455)Chris2017-09-191-1/+1
|
* Fixing profile image tag (#7435)Corey Hulen2017-09-191-1/+1
| | | | | | | | * Fixing profile image tag * Fixing unit test * Fixing unit test
* Renaming repoChristopher Speller2017-09-061-4/+4
|
* app type transition (#7167)Chris2017-09-061-64/+64
|
* PLT-7468 Moved more error pages to use predefined error types (#7378)Harrison Healey2017-09-051-1/+1
| | | | | | | | * PLT-7468 Moved more errors to use error types * PLT-7468 Moved 404 error page to use error types * Made helper function for rendering external links on error page
* APIv4: NewLocAppError -> NewAppError (#7328)George Goldberg2017-08-311-13/+7
|
* Fix setting profile image for other users (#7306)Joram Wilander2017-08-311-1/+1
|
* set to default value with config is missing (#7320)Saturnino Abril2017-08-301-1/+1
|
* PLT-6226 Fixing races with licensing (#7213)Corey Hulen2017-08-161-1/+1
| | | | | | | | | | * PLT-6226 Fixing races with licensing * Fixing build issue * Fixing licensing issue * removing commented code