Message Boards Message Boards

GROUPS:

Change the permissions of a cloud notebook?

Posted 1 month ago
341 Views
|
4 Replies
|
1 Total Likes
|

I have a notebook, e. g. "190427 Drei Hunde.nb", stored within the Wolfram cloud. It has Permissions Private as I can see from Details.

But I cannot change that Permissions to Public. Neither from the browser cloud interface, nor programmatically from within the notebook opened in the web interface "http://lab.wolframcloud.com/app/objects/wernergg/190427%20Drei%20Hunde.nb"

I think from within the notebook I should do something like

co=CloudObject[...[Notebook[]]]
SetOptions[co,Permissions->"Public"]

but I cannot find out how to create a CloudObject from the current notebook.

4 Replies

Hello Werner,

You probably figured it out by now, but here's how you can create the notebook and make it public:

obj = CloudDeploy[
   Notebook[{Cell["head", "Section"], Cell["text", "Text"]}],
   "MyPath/MyNotebook.nb"
   ];
SetOptions[obj, Permissions -> "Public"];

Hope it helps, Quenio

Posted 1 month ago

Thanks Quenio, I think this makes a public COPY of a notebook, but does not change the original notebook permissions. Just like "Publish" from the UIs does.

For me it's a bit strange that a files attributes cannot be changed. But I can live with that copies.

You can get a handle to the current cloud notebook using $EvaluationCloudObject. It works inside a cloud notebook (every cloud notebook is a cloud object), but also e.g. inside an APIFunction.

In addition to SetOptions (which you can use to change Permissions as a whole), there is SetPermissions for more granular permission changes (allowing you to change the permissions of individual user groups without affecting others). Plus, SetPermissions even defaults to the current document, so changing its permissions to public (in WL) is as simple as: SetPermissions["Public"]

In the cloud GUI, you could click "Share" in the menu and then "Make it public". Admittedly, that's a bit hidden.

Posted 1 month ago

Thanks a lot, Jan

I did not know, that

SetPermissions["Public"]

applies to the current document.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract