Skip to content

Commit

Permalink
Fixed bug w/ not checking permissions in copy
Browse files Browse the repository at this point in the history
  • Loading branch information
kelockhart committed Dec 5, 2023
1 parent 02ead23 commit c4e22f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions biblib/views/operations_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ def post(self, library):
return err(NO_LIBRARY_SPECIFIED_ERROR)
if len(data['libraries']) > 1:
return err(TOO_MANY_LIBRARIES_SPECIFIED_ERROR)
# Check the permissions of the user
if not self.write_access(service_uid=user_editing_uid,
library_id=data['libraries'][0]):
return err(NO_PERMISSION_ERROR)

lib_names = []
with current_app.session_scope() as session:
Expand Down

0 comments on commit c4e22f6

Please sign in to comment.