Commit Graph

24 Commits

Author SHA1 Message Date
Doug Lauder
5e59b5f70c MM-23935 extend session expiry on user activity (#14275)
* MM-23935  extend session expiry on user activity

- if user types anything before a session expires the session will be extended to now + session length

- ensures new session expiries are not written to DB too frequently

- new session store func for updating session ExpiresAt

- session length defaults for mobile and web/ldap changed from 180 days to 30 days
2020-05-06 15:41:10 -04:00
Agniva De Sarker
47e493ea82 MM-23567: Remove goroutines from session_store.go (#13955)
* Remove goroutines from session_store.go

There isn't much benefit of running these 2 queries concurrently
versus just serially. These queries are not in the hot path anyways.
Maybe just simpler to keep it serial.

* Incorporate review comments
2020-03-27 22:37:20 +05:30
Jesús Espino
2a5d30f8f3 Making private some sqlstore methods (#13895)
* Making private some sqlstore methods

* Calling for create indexes on missing stores

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
2020-03-03 11:45:49 +01:00
Jesús Espino
a63684fcb5 Consistent license message for all the go files (#13235)
* Consistent license message for all the go files

* Fixing the last set of unconsistencies with the license headers

* Addressing PR review comments

* Fixing busy.go and busy_test.go license header
2019-11-29 12:59:40 +01:00
Miguel de la Cruz
2259b7f2a8 [MM-19948] Set version on module file and internal paths (#13186)
* [MM-19948] Set version on module file and internal paths

* Fixes after merge

* Fix i18n checker error
2019-11-28 14:39:38 +01:00
Nikhil Ranjan
40b5db7637 Converting to structured logging the file store/sqlstore/session_store.go (#12088) 2019-09-10 10:39:55 +02:00
Jesús Espino
fe8a0f6485 Guest accounts feature (#11428)
* MM-14139: Creating permissions for invite/promote/demote guests (#10778)

* MM-14139: Creating permissions for invite/promote/demote guests

* Fixing tests

* Adding invite guest api endpoint (#10792)

* Adding invite guest api endpoint

* Adding i18n

* Adding some tests

* WIP

* Migrating Token.Extra info to bigger size (2048)

* Fixing tests

* Adding client function for invite guests

* Adding send guests invites tests

* Renaming file from guest to guest_invite

* Adding Promote/Demote users from/to guest endpoints (#10791)

* Adding Promote/Demote users from/to guest endpoints

* Adding i18n translations

* Adding the client functions

* Using getQueryBuilder function

* Addressing PR review comments

* Adding default channels to users on promte from guest (#10851)

* Adding default channels to users on promte from guest

* Addressing PR review comments

* Fixing merge problems

* Sending websockets events on promote/demote (#11403)

* Sending websockets events on promote/demote

* Fixing merge problems

* Fixing govet shadowing problem

* Fixing feature branch tests

* Avoiding leaking users data through websockets for guest accounts (#11489)

* Avoiding leaking users data through websockets for guest accounts

* Adding tests and fixing code error

* Fixing i18n

* Allow to enable/disable guests and other extra config settings (#11481)

* Allow to enable/disable guests and other extra config settings

* Fixing tests and moving license and config validation to api level

* Update api4/role_test.go

Co-Authored-By: George Goldberg <george@gberg.me>

* Update api4/role_test.go

Co-Authored-By: George Goldberg <george@gberg.me>

* Fixing typo

* fixing tests

* Managing correctly the guest channel leave behavior (#11578)

* MM-15134: Removing guests from teams or system on leave channels if needed

* WIP

* No deactivating the guest user when leave the last team

* Adding a couple of tests

* Fixing shadow variables

* Fixing tests

* fixing tests

* fixing shadow variables

* Adding guest counts for channel stats (#11646)

* Adding guest counts for channel stats

* Adding tests

* Fixing tests

* Fixing guest domain restrictions (#11660)

* Adding needed migration for the database

* Fixing migration
2019-07-22 22:13:39 +02:00
Rodrigo Villablanca Vásquez
6535010366 Migrate Team.GetTeamsForUser to Sync by default (#11148)
* Migrate Team.GetTeamsForUser to Sync by default

* Improvements

* Requested change

* Requested changes
2019-06-17 10:49:19 +02:00
piperRyan
2f36158adb [MM-15797] Migrate Session.Remove to Sync by default (#11069)
* [MM-15797] Migrate Session.Remove to Sync by default

* Remove unnecessary channel logic and simplify

* Refactor code to be more consistent with code base

* Rename variable to avoid shadow declaration

* Add missing checks in tests

* Regenerate the mocks

* Run gofmt over code
2019-06-13 22:02:52 +02:00
Bolarinwa Balogun
58e126b910 MM-15801 Migrate "Session.UpdateRoles" to Sync by default (#11015) 2019-06-12 20:45:47 +02:00
Marc Argent
b0ad3c10e9 GH-10932 Migrate 'Session.UpdateLastActivityAt' to Sync by default (#11078)
* Migrate Session.UpdateLastActivityAt to Sync by default

* GH-10932 fix tests

* GH-10932 update add session code
2019-06-11 19:40:05 +02:00
Mounica Paladugu
978ee13262 Migrate Session.RemoveAllSessions to Sync by default (#11037) 2019-06-06 16:03:20 +01:00
KimSeungHyeon
367ffbfb42 MM - 15795 Migrate "Session.GetSessions" to Sync by default (#11000) 2019-06-04 06:15:31 +02:00
Bolarinwa Balogun
4cfe61393b [MM-15802] Migrate "Session.UpdateDeviceId" to Sync by default (#11017) 2019-06-03 16:16:50 +02:00
Woolim Cho
d1f81842a5 [MM-15799] Migrate "Session.PermanentDeleteSessionsByUser" to Sync by default (#11038) 2019-06-03 13:22:02 +02:00
GianOrtiz
ec20d3a844 MM-15794 Migrate "Session.Get" to Sync by default (#10990) 2019-05-30 23:22:19 +02:00
Evan do Carmo
ae6fed827a #10939 Migrate "Session.Save" to Sync by default (#10944)
* Migrate "Session.Save" to Sync by default

* fixing unreachable code

* removing shadowing

*  whitespace changes, refactoring flow control logic

* removing unnecessary whitespace
2019-05-30 12:10:24 -04:00
Bolarinwa Balogun
bdcee4d979 MM-15796 Migrate "Session.GetSessionsWithActiveDeviceIds" to Sync by default (#10954)
* MM-15796 Migrate "Session.GetSessionsWithActiveDeviceIds" to Sync by default

* Change API Call to use Sync approach
2019-05-28 15:55:04 +02:00
Bolarinwa Balogun
674b6f2285 [MM-15803] Migrate "Session.AnalyticsSessionCount" to Sync by default (#10948)
* [MM-15803] Migrate "Session.AnalyticsSessionCount" to Sync by default

* Use Explict Async for sessionChan in analytics.go
2019-05-27 18:54:46 +02: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
dce0616305 ABC-73 Move session clean-up to daily task (#8095)
* Move session clean-up to daily task

* Split delete query into batches
2018-01-17 08:50:49 -05:00
Chris
c5e8cb25ca simplify things (#7735) 2017-10-30 11:57:24 -05:00
Chris
363568b4eb reduce store boiler plate (#7585) 2017-10-06 11:12:10 -04:00
Chris
49fe5fbf3d Move sql store code into store/sqlstore package (#7502)
* move sql store code into store/sqlstore package

* move non-sql constants back up to store

* fix api test

* derp
2017-09-25 10:11:25 -04:00