Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure team administration when pausing/unpausing projects #3097

Merged
merged 3 commits into from
Aug 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md).
### Fixed

- Fixed a bug where large volume downloads contained invalid data.zip archives [#3086](https://github.com/scalableminds/webknossos/pull/3086)
- Fixed a bug where non-privileged users were wrongly allowed to pause/unpause projects [#3097](https://github.com/scalableminds/webknossos/pull/3097)

### Removed

Expand Down
1 change: 1 addition & 0 deletions app/controllers/ProjectController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class ProjectController @Inject()(val messagesApi: MessagesApi) extends Controll
private def updatePauseStatus(projectName: String, isPaused: Boolean)(implicit request: SecuredRequest[_]) = {
for {
project <- ProjectDAO.findOneByName(projectName) ?~> Messages("project.notFound", projectName)
_ <- ensureTeamAdministration(request.identity, project._team)
_ <- ProjectDAO.updatePaused(project._id, isPaused) ?~> Messages("project.update.failed", projectName)
updatedProject <- ProjectDAO.findOne(project._id) ?~> Messages("project.notFound", projectName)
js <- updatedProject.publicWrites
Expand Down