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
Этот коммит содержится в:
@@ -1241,6 +1241,7 @@ func viewChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
c.App.UpdateLastActivityAtIfNeeded(*c.App.Session())
|
||||
c.ExtendSessionExpiryIfNeeded(w, r)
|
||||
|
||||
// Returning {"status": "OK", ...} for backwards compatibility
|
||||
resp := &model.ChannelViewResponse{
|
||||
|
||||
@@ -90,6 +90,7 @@ func createPost(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
c.App.UpdateLastActivityAtIfNeeded(*c.App.Session())
|
||||
c.ExtendSessionExpiryIfNeeded(w, r)
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user