Skip to content

chore: update migration timestamps in journal metadata - #265

Merged
Joel-Joseph-George merged 1 commit into
ft/user-central-rbacfrom
journal-migration-timestamp-fix
Aug 12, 2026
Merged

chore: update migration timestamps in journal metadata#265
Joel-Joseph-George merged 1 commit into
ft/user-central-rbacfrom
journal-migration-timestamp-fix

Conversation

@kaseywright

Copy link
Copy Markdown
Contributor

When testing a migration from the current PROD state to the User Centric state, it was seen that the journal timestamps were not consistent with the migrations order, causing drizzle to no apply the migrations properly.

If this can be verified, this change will fix the issue.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 356ac13c-9182-470c-bd62-522abeb74f7a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kaseywright kaseywright mentioned this pull request Aug 11, 2026
@Joel-Joseph-George
Joel-Joseph-George merged commit 164e755 into ft/user-central-rbac Aug 12, 2026
1 check passed
@github-actions
github-actions Bot deleted the journal-migration-timestamp-fix branch August 12, 2026 05:05
Joel-Joseph-George added a commit that referenced this pull request Aug 21, 2026
* user central rbac first draft

* review changes and pass org roles

* format fix

* added db migration files

* updated db migration files as per review

* code review fixes

* policy fixes and other code review issues

* code review fixes, issues found by code rabbit

* minor bug fixes

* updated code in order to incorporate org switcher ui

* error fix

* format fix

* error fixes

* ft: add role assignment support to project user addition and implement service unit tests

* ft: add PATCH /projects/:projectId/users/:userId endpoint to update member roles

* docs(rbac): add org membership and solo workflow design spec

* fix(auth): restore grant.projectId === null guard for org-scoped authorize checks

Re-applies the fix from 10df565 that was regressed in 27719f5.

Without this check, a project-pinned user (e.g. Project Translator in
org:1/project:10) could satisfy org-scoped permission checks for org:1
(e.g. project:create) — a privilege escalation.

The org-scoped branch of isGrantApplicable now requires:
  grant.orgId === orgId && grant.projectId === null

Test updated: replaced the test that was asserting the regressed
(incorrect) behaviour with two corrected assertions:
- project-pinned grant does NOT satisfy an org-scoped action → false
- org-wide grant (projectId=null) satisfies an org-scoped action → true

All 19 authorize tests pass.

* feat: implement organization user management and project role assignments

- Add route to remove users from organizations, including permission checks and response handling.
- Enhance project creation route to support automatic personal organization provisioning for users without existing organizations.
- Update project user management to handle role assignments and removals, ensuring proper permissions and error handling.
- Introduce tests for user role invitation and organization membership management.
- Refactor user role service to streamline role granting and organization invitations.
- Implement email notifications for inviting existing users to organizations.
- Update permissions logic to ensure Org Member roles carry no permissions and can only be assigned by authorized users.

* fix: formatting code base

* feat: fixes for valid code rabbit concerns

* refactor: clean up unused fields and improve permission validation

* fix: improve formatting and consistency in user roles repository

* refactor: replace roleName with roleId in user invitation flows and add optional projectId to orgFromBody middleware

* Ft: Coderabbit suggestion

* ft: Migration file changes regarding the user centric changes

* feat: suggestions in migrations from code rabbit

* ft: enforce project access control in AI tools and suggestions via new middleware and updated policies

* feat: enhance user role management by introducing roleName parameter across services and routes

* ft:Code rabbit suggestions

* chore: renumber branch migrations 0015-0018 → 0019-0022 ahead of main merge

* fix(rbac): update verse-audio middleware to user-centric grants shape

* feat: implement verse audio files updated with rbac changes

* fix(rbac): improve validation for projectUnitId and bibleTextId in verse audio access middleware

* chore: update migration timestamps in journal metadata (#265)

Co-authored-by: kaseywright <kasey.wright@biblionexus.org>

* feat: add migration script for project manager roles

* feat: enhance user management with createdBy tracking in project user operations

* fix:format

* fix:format error

* feat: include created_by field in user_roles and project_roles migrations

* feat: implement temporary bypass for Project Managers to create projects

* Refactor translation-resources.tests.ts for new rbac

---------

Co-authored-by: Kasey Wright <kasey@kaseywright.com>
Co-authored-by: joel-joseph-george <joelpadeesseril@gmail.com>
Co-authored-by: kaseywright <kasey.wright@biblionexus.org>
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.

2 participants