observablehq / feedback

Customer submitted bugs and feature requests
42 stars 3 forks source link

schedules: currentUser is only available in unpublished team notebooks #607

Closed nachocab closed 4 months ago

nachocab commented 7 months ago

The documentation for the schedules says that it's possible to detect if it's running in the cloud or not, but if I access currentUser.login I get an error: RuntimeError: currentUser is only available in unpublished team notebooks

CobusT commented 7 months ago

We plan on having currentUser available in individual workspaces soon. It is currently only available in team workspaces.

tophtucker commented 7 months ago

Oddly, it will still work currently; it’ll error in the notebook in the browser, and not in the scheduled run in the cloud, because the scheduler service defines currentUser. But yes, as Cobus said, it’s confusing currently and we’re fixing it. (currentUser has historically been just for private team-workspace notebooks.)

tophtucker commented 4 months ago

You can now access currentUser in any private notebook. (We eliminated the distinction between “individual” and “team-owned” notebooks; they’re all notebooks in a workspace. In the individual case, the workspace just has one member.)