MM-35332 honour config setting when extending session expiry (#17581)
Honour `ServiceSettings.ExtendSessionLengthWithActivity` config setting when extending session expiry on activity.
Этот коммит содержится в:
@@ -351,6 +351,10 @@ func (a *App) UpdateLastActivityAtIfNeeded(session model.Session) {
|
||||
// A new ExpiresAt is only written if enough time has elapsed since last update.
|
||||
// Returns true only if the session was extended.
|
||||
func (a *App) ExtendSessionExpiryIfNeeded(session *model.Session) bool {
|
||||
if !*a.Srv().Config().ServiceSettings.ExtendSessionLengthWithActivity {
|
||||
return false
|
||||
}
|
||||
|
||||
if session == nil || session.IsExpired() {
|
||||
return false
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user