({{, (RefLink[SetPermissions, paclet:ref/SetPermissions])[obj,"pstring"]
sets permissions for the cloud object obj to be as specified by the string pstring.}, {, (RefLink[SetPermissions, paclet:ref/SetPermissions])[obj,class->per]
sets permissions for the specified class of users to be per.}, {, (RefLink[SetPermissions, paclet:ref/SetPermissions])[pers]
sets permissions as specified by pers for the cloud object corresponding to the current document.}})

OpenersNotesSection(Spacer1)Details

(RefLink[SetPermissions, paclet:ref/SetPermissions]) effectively changes the setting for the permissions option of a cloud object.

(RefLink[SetPermissions, paclet:ref/SetPermissions])[obj,class->per] overwrites any other permissions set for class.

Classes can be individual users, (RefLink[PermissionsGroup, paclet:ref/PermissionsGroup]) objects, or overall classes such as (RefLink[All, paclet:ref/All]) or "Authenticated".

(RefLink[SetPermissions, paclet:ref/SetPermissions])[…,"Public"] is equivalent to (RefLink[SetPermissions, paclet:ref/SetPermissions])[…,(RefLink[All, paclet:ref/All])->(RefLink[Automatic, paclet:ref/Automatic])].

(RefLink[SetPermissions, paclet:ref/SetPermissions])[…,"Private"] resets all permissions to private.

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

By default, cloud objects can be read only by the owner:

obj = CloudPut[100!]

Options[obj, Permissions]

Make the cloud object visible to the world:

SetPermissions[obj, "Public"]

OpenersExampleSection1(Spacer1)Scope  (1)

Use a permissions group:

obj = CloudPut[100!]

Options[obj,Permissions]

SetPermissions[obj,PermissionsGroup["mygroup"]->{"Read","Write"}]

OpenersExampleSection3(Spacer1)Properties & Relations  (2)

(RefLink[SetPermissions, paclet:ref/SetPermissions])["Private"] removes all permissions:

obj = CloudPut[100!]

SetPermissions[obj,{PermissionsGroup["mygroup"]->{"Read","Write"}, All->"Read"}]

SetPermissions[obj, "Private"]

(RefLink[ClearPermissions, paclet:ref/ClearPermissions])[(RefLink[All, paclet:ref/All])] only removes permissions explicitly given for the class (RefLink[All, paclet:ref/All]):

obj = CloudPut[100!]

SetPermissions[obj,{PermissionsGroup["mygroup"]->{"Read","Write"}, All->"Read"}]

ClearPermissions[obj, All]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[CloudPublish, paclet:ref/CloudPublish])  ▪  (RefLink[ClearPermissions, paclet:ref/ClearPermissions])  ▪  (RefLink[Permissions, paclet:ref/Permissions])  ▪  (RefLink[SetOptions, paclet:ref/SetOptions])  ▪  (RefLink[CloudShare, paclet:ref/CloudShare])  ▪  (RefLink[PermissionsGroup, paclet:ref/PermissionsGroup])  ▪  (RefLink[$Permissions, paclet:ref/$Permissions])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Cloud Permissions Control, paclet:guide/CloudPermissionsControl])}, {▪(RefLinkPlain[Structured Data in the Cloud, paclet:guide/StructuredDataInTheCloud])}})}})