Add a user or group to the content as an "owner" (collaborator) or "viewer"

acl_add_user(content, user_guid, role)

acl_add_group(content, group_guid, role)

acl_add_collaborator(content, user_guid)

acl_add_viewer(content, user_guid)

acl_remove_user(content, user_guid)

acl_add_self(content)

acl_remove_self(content)

acl_remove_group(content, group_guid)

Arguments

content

The R6 Content object (as returned by content_item())

user_guid

The user's GUID. Use get_users()

role

One of "owner" or "viewer"

group_guid

The group's GUID. Use get_groups()

Value

The R6 content object (for piping)

Details

  • acl_add_user() allows you to add ACL for a user and specify role

  • acl_add_group() allows you to add ACL for a group and specify role

  • acl_add_collaborator() is a helper to add a user collaborators

  • acl_add_viewer() is a helper to add a user viewer

  • acl_remove_user() removes a user's ACLs from a piece of content

  • acl_remove_group() removes a group's ACLs from a piece of content

  • acl_add_self() is useful for admins and adds the current user as a collaborator

  • acl_remove_self() removes the current user's ACLs from a piece of content