Skip to content

Commit ba35908

Browse files
authored
allow team managers to activate users (#3050)
* allow team managers to activate/dactivate users * update changelog * fix compilation * allow only activating (not deactivating) users for team managers
1 parent a26252b commit ba35908

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md).
3535

3636
- Added a checkbox to disable the warning when deleting a tree. An accidentally deleted tree can easily be restored using the Undo functionality. [#2995](https://github.com/scalableminds/webknossos/pull/2995)
3737
- Improved the UI for sharing datasets and tracings. [#3029](https://github.com/scalableminds/webknossos/pull/3029)
38+
- Team managers are now allowed to activate users (previously admin-only) [#3050](https://github.com/scalableminds/webknossos/pull/3050)
3839
- Improved the loading time of datasets in the dashboard. [#3036](https://github.com/scalableminds/webknossos/pull/3036)
3940

4041
### Fixed

app/controllers/UserController.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class UserController @Inject()(val messagesApi: MessagesApi)
183183
}
184184

185185
private def checkAdminOnlyUpdates(user: User, isActive: Boolean, isAdmin: Boolean, email: String)(issuingUser: User): Boolean = {
186-
if (user.isDeactivated == !isActive && user.isAdmin == isAdmin && user.email == email) true
186+
if (isActive && user.isAdmin == isAdmin && user.email == email) true
187187
else issuingUser.isAdminOf(user)
188188
}
189189

0 commit comments

Comments
 (0)