Skip to content

Commit a130937

Browse files
author
Matthew Fisher
committed
fix(controller): disallow unauthorized users from rolling back releases
Because we did not check the user's permissions inside the view, a user who did not have authorization could roll back an application's release version.
1 parent 33f6e6a commit a130937

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

controller/api/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ def rollback(self, request, *args, **kwargs):
368368
"""
369369
try:
370370
app = get_object_or_404(models.App, id=self.kwargs['id'])
371+
self.check_object_permissions(self.request, app)
371372
release = app.release_set.latest()
372373
version_to_rollback_to = release.version - 1
373374
if request.DATA.get('version'):

0 commit comments

Comments
 (0)