Skip to content

Modify has_read_privs to return false if user is not a member of the default read group #119

@maxsibilla

Description

@maxsibilla

#check to see if a user has read privileges
#the user has read privileges if they are a member of the
#default read group or if they have write privileges at all per the above has_write_privs method
def has_read_privs(self, groups_token):
user_info = self.getUserInfo(groups_token, getGroups = True)
if isinstance(user_info, Response):
return user_info
if not self.data_read_group_uuid is None and self.data_read_group_uuid in user_info['hmgroupids']:
return True
return self.has_write_privs(groups_token)

Users should always be a part of the default read group so we need to be able to flag those who have access via Globus but are not yet a part of the default read group. We have run into issues with functionality in the SenNet portal with this exact use-case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions