Skip to content

Commit

Permalink
Fix can_change_object_store for anonymous users.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Feb 10, 2024
1 parent b4124eb commit d6ae720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/model/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ def can_change_object_store_id(self, user, dataset):
history_dataset_association on history_dataset_association.history_id = history.id
WHERE history.user_id != :user_id and history_dataset_association.dataset_id = :dataset_id
"""
).bindparams(dataset_id=dataset.id, user_id=user.id)
).bindparams(dataset_id=dataset.id, user_id=user.id if user else None)
return self.sa_session.scalars(query).first() == 0

def get_item_actions(self, action, item):
Expand Down

0 comments on commit d6ae720

Please sign in to comment.