observablehq / feedback

Customer submitted bugs and feature requests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

schedules: currentUser is only available in unpublished team notebooks

nachocab opened this issue · comments

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

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

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.)

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.)