Commit Graph

42 Commits

Author SHA1 Message Date
Jesús Espino
12c50eb830 Initial migration of the store to be sync (#10592)
* Migrating audit store

* Final migration example for the audit store

* async example

* Ending migration

* Removing Async helper

* Fixing tests

* Fixing govet problems with the StoreResult instanstiation
2019-04-15 22:53:52 +02:00
Christopher Speller
5dae08761c Improving default session timeout behavour. (#10453)
* Improving default session timeout behavour.

* Changing mind to 180 days instead of 548 days
2019-03-15 10:44:27 -07:00
Christopher Speller
ecade2f1ec MM-12849 Moving all non request scoped items to Server struct (#9806)
* Moving goroutine pool

* Auto refactor

* Moving plugins.

* Auto refactor

* Moving fields to server

* Auto refactor

* Removing siteurl duplication.

* Moving reset of app fields

* Auto refactor

* Formatting

* Moving niling of Server to after last use

* Fixing unit tests.
2018-11-07 10:20:07 -08:00
Jesse Hallam
d1805733fe MM-12505: remove all things WebRTC (#9700) 2018-10-18 14:49:10 -03:00
Mukul Rawat
6aaa10bddb [MM-12538] Migrate to idiomatic error handling the file app/session.go (#9590)
in the mattermost-server (#9573)

* Refactor and make error handling idiomatic

* Golint gives a warning when using method parameters with names like
'deviceId', so rename them to `deviceID`

* Change all ID back to Id
2018-10-15 20:03:22 +01:00
Yusuke Nemoto
6104c37761 Break HTML blocks to individual strings (#8903)
* Modifying message and templates about mfa_change

* Modifying message and templates about password_change

* Modify message and template about password_reset

* Modify message and template about singin_change

* Modify message and template about email_info

* Modify message and template about change_username

* Modify message about change_email

* Add missing props

* Add argument

* Modify message and template about token_added

* Modify messages and template about notification_email

* Modify message and template about deactivate_email

* Fix style

* Remove unused message

* Remove br tags

* Modify message and code about invite_mail

* Add missing message
2018-07-20 12:52:20 -04:00
Joram Wilander
2114e96f00 Reset status to away after web conn disconnect if necessary (#8988) 2018-06-27 14:19:06 -07: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
Joram Wilander
7987c95fcd MM-10133 Suppress confusing personal access token message in invalid session error (#8645)
* Suppress confusing personal access token message in invalid session error

* Updates per feedback
2018-04-20 08:44:01 -04:00
Christopher Speller
cf1688f94a Fixing DB load causing user logout. (#8559) 2018-04-02 08:22:25 -07:00
Harrison Healey
6ef6c69968 Fixed missing error in log message (#8485) 2018-03-21 09:13:20 -04:00
Joram Wilander
4a1802c039 MM-9664 Add invalidation metrics for store caches (#8340)
* Add invalidation metrics for store caches

* Increment session invalidation metric

* Fix tests
2018-03-05 10:35:26 -05:00
Chris
1ec295f88c add App.License, remove utils.IsLicensed / utils.License calls (#8203) 2018-02-06 17:25:49 -06:00
Adrian Carolli
b1d13a2d89 [PLT-7793] Add /users/tokens/search endpoint (#8088)
* Add /users/tokens/search endpoint + tests

* Fix check-style

* Unnecessary deletion
2018-01-11 16:30:55 -05:00
Adrian Carolli
fd3fa8f8dc [PLT-7793] Added /users/tokens endpoint (#8038)
* 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
2018-01-05 14:46:48 -05:00
Chris
5cf45d2155 refactor template code (#7860) 2017-11-20 12:57:45 -05:00
Chris
c5e8cb25ca simplify things (#7735) 2017-10-30 11:57:24 -05:00
Chris
7ed011745a Remove more global refs / state (#7723)
* remove more global refs / state

* fix job enterprise initialization

* fix api4 test compilation

* saml api endpoints fix
2017-10-26 15:21:22 -04:00
Christopher Speller
4491b5ecdf Performance improvements for 40M posts (#7708)
* 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
2017-10-25 11:48:15 -07:00
Chris
2a2af0e390 eliminate more utils.Cfg references (#7701) 2017-10-24 09:00:05 -07:00
Nick Frazier
7fa4913f90 [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
2017-10-19 08:10:29 -04:00
Chris
8e19ba029f Reduce utils.Cfg references (#7650)
* app.UpdateConfig method

* test fix

* another test fix

* the config override option as-was is just error prone, remove it for now

* derp
2017-10-18 15:36:43 -07:00
Joram Wilander
affd35071e Updates to session revoking in v4 (#7565) 2017-10-04 11:04:17 -04:00
Joram Wilander
15b361094a PLT-7633 (E20) Add session idle timeout config setting (#7524)
* Add session idle timeout config setting

* Modify config setting name to SessionIdleTimeoutInMinutes

* Small re-org of if statement

* Merge with latest master
2017-09-28 14:04:52 +01:00
Chris
8c80cdde38 remove remaining Global() calls (outside of tests) (#7521) 2017-09-28 00:52:34 +08:00
Chris
ac74066f0e remove einterface gets (#7455) 2017-09-19 18:31:35 -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
enahum
a360ac6dbd Fix log error message for UpdateLastActivityAtIfNeeded (#7282) 2017-08-25 15:15:23 +01:00
Joram Wilander
713673c888 PLT-7194 Add email when adding user access tokens (#7087)
* Add email when adding user access tokens

* Update en.json

* Update en.json
2017-08-03 08:51:52 -04:00
Joram Wilander
59992ae4a4 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
2017-07-31 12:59:32 -04:00
Corey Hulen
36f216cb7c PLT-6080 moving clustering to memberlist (#6499)
* PLT-6080 adding cluster discovery service

* Adding memberlist lib

* Adding memberlist lib

* WIP

* WIP

* WIP

* WIP

* Rolling back config changes

* Fixing make file

* Fixing config for cluster

* WIP

* Fixing system console for clustering

* Fixing default config

* Fixing config

* Fixing system console for clustering

* Tweaking hub setting

* Bumping up time

* merging vendor dir

* Updating vendor dir

* Fixing unit test

* Fixing bad merge

* Remove some testing code

* Moving comment

* PLT-6868 adding db ping retry

* Removing unused loc strings

* Adding defer to cancel
2017-06-19 08:44:04 -07:00
Joram Wilander
0ae6886513 Detach session activity update from statuses (#6379) 2017-05-10 09:48:50 -04:00
Christopher Speller
e52ab9737e Fixing session error (#6370) 2017-05-09 15:21:20 -04:00
Christopher Speller
134f78e630 Fxing hub panic (#6214) 2017-04-24 12:40:17 -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
Corey Hulen
847c716ea2 Example of how to call metrics (#5621) 2017-03-06 10:15:37 -05:00
Ruzette Tanyag
4e7dbc3bb0 Implement user sessions endpoints for APIv4 (#5449)
* added get session and revoke session endpoints, unittests and drivers

* removed BasicUser2 and added teardown

* added badrequest unit test case for sessions

* added session loop to check if user id and session user id matches

* fixed indentation issues for user_test

* match indentation from spaces to tabs
2017-02-17 10:31:01 -05:00
Joram Wilander
d245b29f82 More app code migration (#5170)
* Migrate admin functions into app package

* More user function refactoring

* Move post functions into app package
2017-01-25 09:32:42 -05:00
Joram Wilander
d3a285e64d Migrate functions to app package (#5106)
* Refactor and move session logic into app package

* Refactor email functions into the app package

* Refactor password update into app package

* Migrate user functions to app package

* Move team functions into app package

* Migrate channel functions into app package

* Pass SiteURL through to app functions

* Update based on feedback
2017-01-19 09:00:13 -05:00
Joram Wilander
0e2b321e6f Refactor and migrate more functions out of api into app package (#5063) 2017-01-13 15:17:50 -05:00
Joram Wilander
97558f6a6e PLT-4938 Add app package and move logic over from api package (#4931)
* Add app package and move logic over from api package

* Change app package functions to return errors

* Move non-api tests into app package

* Fix merge
2017-01-13 13:53:37 -05:00