...
Code Block | ||||
---|---|---|---|---|
| ||||
# If we know that those users will always share the same permissions, we can create an "admin" group for them ./opencga.sh studies groups-create -s projectAlias:studyAlias --users user1-admin,user2-admin --group admin # And now we give admin permissions to the @admin group. Important: groups in opencga are always preceded by @ internally although it is not mandatory adding it when we create it ! .//opencga.sh studies acl-create --members @admin --template admin -s projectAlias:studyAlias |
...
- user1-analyst, user2-analyst, user3-analyst should have access to data (read and write) but they should not be able to delete anything.
Code Block | ||||
---|---|---|---|---|
| ||||
# If we know that those users will always share the same permissions, we can create an "analyst" group for them ./build/bin/opencga.sh studies groups-create -s projectAlias:studyAlias --users user1-analyst,user2-analyst,user3-analyst --group analyst # And now we give admin permissions to the @analyst group. ./build/bin/opencga.sh studies acl-create --members @analyst --template analyst -s projectAlias:studyAlias |
...
- user1-external, user2-external, user3-external should have just view access to all the files but not the rest of entries.
Code Block | ||||
---|---|---|---|---|
| ||||
# If we know that those users will always share the same permissions, we can create an "external group for them ./build/bin/opencga.sh studies groups-create -s projectAlias:studyAlias --users user1-external,user2-external,user3-external --group external # And now we give admin permissions to the @external group. ./build/bin/opencga.sh studies acl-create --members @external -s projectAlias:studyAlias --permissions VIEW_FILES,VIEW_FILE_HEADERS,VIEW_FILE_CONTENTS,DOWNLOAD_FILES |
...
- user4-external should have view access to just one sample.
Code Block | ||||
---|---|---|---|---|
| ||||
# We need to create first some permissions to the user at the study entry level. Remember: The absence of permissions is equivalent to denying those permissions. ./build/bin/opencga.sh studies acl-create --members user4-external -s projectAlias:studyAlias # user4-external does not have any permission yet, but we have it registered at the study entry point. Now we can add the permission for the sample ./build/bin/opencga.sh samples acl-create --id sampleName --members user4-external --permissions VIEW -s projectAlias:studyAlias |
...