clockworklabs / clockworklabs/SpacetimeDB
How to get owner identity in a module?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
There doesn't seem to be an available way of retrieving the owner identity (e.g. for reducer caller checks) inside the module.
There's ctx.identity() which is the module identity, useful for self-calling checks — that is, scheduled reducers. But there's no equivalent ctx.owner for checking when the module owner calls the reducer (e.g. with the CLI).
Is there another way to check this, apart from hard-coding the value?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the module context API around ctx.identity() and the reducer entry points used by the CLI. Determine whether owner identity is exposed during reducer calls, and define a supported way to distinguish module self-calls from calls by the module owner without hard-coding a value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api, backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100