Skip to content

Commit

Permalink
Merge 76c1918 into d3ce3bc
Browse files Browse the repository at this point in the history
  • Loading branch information
Avantol13 committed Mar 10, 2020
2 parents d3ce3bc + 76c1918 commit 078f504
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions fence/blueprints/data/indexd.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,9 @@ def metadata(self):

@cached_property
def public(self):
authz_resources = list(self.set_acls)
authz_resources.extend(self.index_document.get("authz", []))
authz_resources = self.index_document.get("authz", [])
if not authz_resources:
authz_resources.extend(list(self.set_acls))
return "*" in authz_resources or "/open" in authz_resources

@login_required({"data"})
Expand Down Expand Up @@ -753,7 +754,10 @@ def get_signed_url(
elif public_data and _is_anonymous_user(user_info):
expiration_time = int(time.time()) + int(expires_in)
url = self._generate_anonymous_google_storage_signed_url(
ACTION_DICT["gs"][action], resource_path, expiration_time
ACTION_DICT["gs"][action],
resource_path,
expiration_time,
r_pays_project=r_pays_project,
)
else:
expiration_time = int(time.time()) + int(expires_in)
Expand Down

0 comments on commit 078f504

Please sign in to comment.