Skip to content

Add permissions support to registerModel#40

Open
neeraj-retool wants to merge 2 commits intomainfrom
nw/plat-907-register-model-permissions
Open

Add permissions support to registerModel#40
neeraj-retool wants to merge 2 commits intomainfrom
nw/plat-907-register-model-permissions

Conversation

@neeraj-retool
Copy link

@neeraj-retool neeraj-retool commented Mar 11, 2026

Summary

  • Adds an optional permissions field to RegisterModelArgs type, matching the existing RegisterFunctionSpec permissions shape (groupNames, userEmails)
  • Forwards permissions to all 6 rpc.register() calls generated by registerModel (create, update, createOrUpdate, findAll, findByPk, findBy)
  • Fully backward compatible — existing callers without permissions are unaffected

Context

This is Phase 1 of PLAT-907. The Experiment and ExperimentStrategy models are currently registered without permissions, exposing unrestricted CRUD operations. This change enables callers to lock down model operations to specific groups/users.

Test plan

  • Build passes (yarn build)
  • Existing tests pass
  • Phase 2 PR in retool_development will consume this to add permissions to Experiment/ExperimentStrategy models

🤖 Generated with Claude Code

Allow callers to pass an optional `permissions` field to `registerModel`,
which gets forwarded to all 6 generated `rpc.register()` calls. This
enables restricting CRUD operations on registered Sequelize models to
specific groups or users.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@neeraj-retool neeraj-retool requested a review from domnit March 11, 2026 06:14
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@neeraj-retool neeraj-retool removed the request for review from domnit March 11, 2026 06:33
@neeraj-retool neeraj-retool marked this pull request as draft March 11, 2026 06:34
@neeraj-retool neeraj-retool requested a review from Mr-Gupta March 12, 2026 01:17
@neeraj-retool neeraj-retool marked this pull request as ready for review March 12, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant