diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 5e22ee06f99..140e1f58d8c 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -20,10 +20,9 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - Datasets stored in WKW format are no longer loaded with memory mapping, reducing memory demands. [#7528](https://github.com/scalableminds/webknossos/pull/7528) - Content Security Policy (CSP) settings are now relaxed by default. To keep stricter CSP rules, add them to your specific `application.conf`. [#7589](https://github.com/scalableminds/webknossos/pull/7589) - WEBKNOSSOS now uses Java 21. [#7599](https://github.com/scalableminds/webknossos/pull/7599) -- Email verification is disabled by default. To enable it, set `webKnossos.emailVerification.activated` to `true` in your `application.conf`. [#7620](https://github.com/scalableminds/webknossos/pull/7620) +- Email verification is disabled by default. To enable it, set `webKnossos.user.emailVerification.activated` to `true` in your `application.conf`. [#7620](https://github.com/scalableminds/webknossos/pull/7620) [#7621](https://github.com/scalableminds/webknossos/pull/7621) - Added more documentation for N5 and Neuroglancer precomputed web upload. [#7622](https://github.com/scalableminds/webknossos/pull/7622) - ### Fixed - Fixed rare SIGBUS crashes of the datastore module that were caused by memory mapping on unstable file systems. [#7528](https://github.com/scalableminds/webknossos/pull/7528) - Fixed loading local datasets for organizations that have spaces in their names. [#7593](https://github.com/scalableminds/webknossos/pull/7593) diff --git a/MIGRATIONS.unreleased.md b/MIGRATIONS.unreleased.md index eb643b59369..8ccf8d4f9fa 100644 --- a/MIGRATIONS.unreleased.md +++ b/MIGRATIONS.unreleased.md @@ -15,7 +15,7 @@ UPDATE webknossos.annotations_ SET state = 'Finished' WHERE _id IN (SELECT DIST ``` - WEBKNOSSOS now uses Java 21 (up from Java 11). [#7599](https://github.com/scalableminds/webknossos/pull/7599) - NodeJS version 18+ is required for snapshot tests with ShadowDOM elements from Antd v5. [#7522](https://github.com/scalableminds/webknossos/pull/7522) -- Email verification is disabled by default. To enable it, set `webKnossos.emailVerification.activated` to `true` in your `application.conf`. [#7620](https://github.com/scalableminds/webknossos/pull/7620) +- Email verification is disabled by default. To enable it, set `webKnossos.user.emailVerification.activated` to `true` in your `application.conf`. [#7620](https://github.com/scalableminds/webknossos/pull/7620) [#7621](https://github.com/scalableminds/webknossos/pull/7621) ### Postgres Evolutions: diff --git a/app/models/user/UserService.scala b/app/models/user/UserService.scala index 70ff00be94b..6c482a6a8c8 100755 --- a/app/models/user/UserService.scala +++ b/app/models/user/UserService.scala @@ -1,10 +1,5 @@ package models.user -import org.apache.pekko.actor.ActorSystem -import play.silhouette.api.LoginInfo -import play.silhouette.api.services.IdentityService -import play.silhouette.api.util.PasswordInfo -import play.silhouette.impl.providers.CredentialsProvider import com.scalableminds.util.accesscontext.{DBAccessContext, GlobalAccessContext} import com.scalableminds.util.cache.AlfuCache import com.scalableminds.util.security.SCrypt @@ -15,18 +10,22 @@ import com.scalableminds.webknossos.datastore.models.datasource.LayerViewConfigu import com.typesafe.scalalogging.LazyLogging import mail.{DefaultMails, Send} import models.dataset.DatasetDAO -import models.team._ -import play.api.i18n.{Messages, MessagesProvider} -import play.api.libs.json._ -import utils.{ObjectId, WkConf} - -import javax.inject.Inject import models.organization.OrganizationDAO +import models.team._ import net.liftweb.common.Box.tryo import net.liftweb.common.{Box, Full} +import org.apache.pekko.actor.ActorSystem +import play.api.i18n.{Messages, MessagesProvider} +import play.api.libs.json._ +import play.silhouette.api.LoginInfo +import play.silhouette.api.services.IdentityService +import play.silhouette.api.util.PasswordInfo +import play.silhouette.impl.providers.CredentialsProvider import security.{PasswordHasher, TokenDAO} import utils.sql.SqlEscaping +import utils.{ObjectId, WkConf} +import javax.inject.Inject import scala.concurrent.{ExecutionContext, Future} class UserService @Inject()(conf: WkConf, @@ -367,7 +366,7 @@ class UserService @Inject()(conf: WkConf, "created" -> user.created, "lastTaskTypeId" -> user.lastTaskTypeId.map(_.toString), "isSuperUser" -> multiUser.isSuperUser, - "isEmailVerified" -> multiUser.isEmailVerified, + "isEmailVerified" -> (multiUser.isEmailVerified || !conf.WebKnossos.User.EmailVerification.activated), ) } }