Skip to content

Commit

Permalink
Merge pull request #22 from edx/matthugs/remove-broken-permissions
Browse files Browse the repository at this point in the history
Remove permission checks which are preventing access to Gradebook
  • Loading branch information
Matt Hughes authored Aug 19, 2019
2 parents 41f26bd + 3066970 commit 6a2d767
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion bulk_grades/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

from __future__ import absolute_import, unicode_literals

__version__ = '0.5.3'
__version__ = '0.5.4'

default_app_config = 'bulk_grades.apps.BulkGradesConfig' # pylint: disable=invalid-name
10 changes: 0 additions & 10 deletions bulk_grades/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def dispatch(self, request, course_id, *args, **kwargs): # pylint: disable=argu
"""
Dispatch django request.
"""
if not (request.user.is_staff or request.user.has_perm('bulk_grades', course_id)):
return HttpResponseForbidden('Not Staff')
self.initialize_processor(request, course_id)
return super(GradeOnlyExport, self).dispatch(request, course_id, *args, **kwargs)

Expand Down Expand Up @@ -156,14 +154,6 @@ def get(self, request, course_id):
history = processor.get_committed_history()
return HttpResponse(json.dumps(history), content_type='application/json')

def dispatch(self, request, course_id, *args, **kwargs): # pylint: disable=arguments-differ
"""
General set-up method for all handler messages in this view.
"""
if not (request.user.is_staff or request.user.has_perm('bulk_grades', course_id)):
return HttpResponseForbidden('Not Staff')
return super(GradeOperationHistoryView, self).dispatch(request, course_id, *args, **kwargs)


class InterventionsExport(GradeOnlyExport):
"""
Expand Down

0 comments on commit 6a2d767

Please sign in to comment.