Skip to content

Commit

Permalink
fix permission for event undo
Browse files Browse the repository at this point in the history
managers can undo restocks. this should have been included with the
previous change concerning fixing manager permissions.
  • Loading branch information
bradjc committed Jun 6, 2019
1 parent 399f919 commit b95360e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chezbetty/views_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3406,13 +3406,13 @@ def admin_event_receipt(request):


@view_config(route_name='admin_event_undo',
permission='admin')
permission='manage')
def admin_event_undo(request):
try:
# Lookup the transaction that the user wants to undo
event = Event.from_id(request.matchdict['event_id'])

# Mangers can only see restocks.
# Mangers can only undo restocks.
if event.type != 'restock' and not request.has_permission('admin'):
raise Exception('Not authorized to undo this event.')

Expand Down

0 comments on commit b95360e

Please sign in to comment.