MM-41211: Adds ability to set SessionLengthSSOInDays to a decimal. (#19396)

* MM-41211: Accepts a decimal for the SSO session length.

* MM-41211: Fixes test and logic error.

* MM-41211: Validates session length is minimum 1 hour.

* MM-41211: Tricking the CI to allow an empty string.

* Fixes a test error and some lint changes.

* Fix error.

* Reverting IDE change.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
mkraft
2022-02-14 12:06:47 -05:00
коммит произвёл GitHub
родитель 10c8c84704
Коммит 7398451030
15 изменённых файлов: 76 добавлений и 54 удалений

Просмотреть файл

@@ -2080,7 +2080,7 @@ func attachDeviceId(c *Context, w http.ResponseWriter, r *http.Request) {
}
c.App.ClearSessionCacheForUser(c.AppContext.Session().UserId)
c.App.SetSessionExpireInDays(c.AppContext.Session(), *c.App.Config().ServiceSettings.SessionLengthMobileInDays)
c.App.SetSessionExpireInHours(c.AppContext.Session(), *c.App.Config().ServiceSettings.SessionLengthMobileInHours())
maxAge := *c.App.Config().ServiceSettings.SessionLengthMobileInDays * 60 * 60 * 24