Skip to content

Commit

Permalink
dataset_version check should be made by has_access, not has_requested…
Browse files Browse the repository at this point in the history
…_access
  • Loading branch information
talavis committed Apr 23, 2019
1 parent fc805d7 commit a180c46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def build_dataset_structure(dataset_version, user=None, dataset=None):

if user:
r['is_admin'] = user.is_admin(dataset)
if user.has_access(dataset):
if user.has_access(dataset, dataset_version.version):
r['authorization_level'] = 'has_access'
elif user.has_requested_access(dataset, dataset_version.version):
elif user.has_requested_access(dataset):
r['authorization_level'] = 'has_requested_access'
else:
r['authorization_level'] = 'no_access'
Expand Down

0 comments on commit a180c46

Please sign in to comment.