Skip to content

Commit

Permalink
PEP8: fix tests for membership
Browse files Browse the repository at this point in the history
  • Loading branch information
lwesterhof committed Aug 1, 2024
1 parent ee5e10c commit 000403e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion datarequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ def file_write_and_lock(ctx, coll_path, filename, data, readers):
msi.set_acl(ctx, "default", "read", reader, file_path)

# Revoke temporary write permission (unless read permissions were set on the invoking user)
if not user.full_name(ctx) in readers:
if user.full_name(ctx) not in readers:
msi.set_acl(ctx, "default", "null", user.full_name(ctx), file_path)
# If invoking user is request owner, set read permission for this user on the collection again,
# else revoke individual user permissions on collection entirely (invoking users will still have
Expand Down
2 changes: 1 addition & 1 deletion deposit.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def api_deposit_copy_data_package(ctx, reference, deposit_group):

# Check if user has write access to research folder.
# Only normal user has write access.
if not groups.user_role(ctx, user_full_name, group_name) in ['normal', 'manager']:
if groups.user_role(ctx, user_full_name, group_name) not in ['normal', 'manager']:
return api.Error('NoWriteAccessTargetCollection', 'Not permitted to write in selected folder')

# Register to delayed rule queue.
Expand Down
2 changes: 1 addition & 1 deletion vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def api_vault_copy_to_research(ctx, coll_origin, coll_target):

# Check if user has write access to research folder.
# Only normal user has write access.
if not groups.user_role(ctx, user_full_name, group_name) in ['normal', 'manager']:
if groups.user_role(ctx, user_full_name, group_name) not in ['normal', 'manager']:
return api.Error('NoWriteAccessTargetCollection', 'Not permitted to write in selected folder')

# Register to delayed rule queue.
Expand Down

0 comments on commit 000403e

Please sign in to comment.