Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Conversation

@BolajiOlajide
Copy link
Contributor

@BolajiOlajide BolajiOlajide commented Feb 4, 2023

We already have roles and permissions seeded into the database, however, we didn't assign permissions to roles. In this PR, we make sure whenever new permission is added; we auto-assign it to the system roles. USER and SITE_ADMINISTRATOR.

Closes #47231

Test plan

  • Manually tested
  • Added unit tests

@BolajiOlajide BolajiOlajide added batch-changes Issues related to Batch Changes rbac labels Feb 4, 2023
@BolajiOlajide BolajiOlajide self-assigned this Feb 4, 2023
@cla-bot cla-bot bot added the cla-signed label Feb 4, 2023
@BolajiOlajide BolajiOlajide requested a review from a team February 4, 2023 08:42
@BolajiOlajide BolajiOlajide marked this pull request as ready for review February 4, 2023 08:42
@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented Feb 4, 2023

Codenotify: Notifying subscribers in CODENOTIFY files for diff 5294b54...dc3924f.

Notify File(s)
@efritz internal/oobmigration/migrations/batches/role_assignment_migrator.go
internal/oobmigration/migrations/batches/role_assignment_migrator_test.go
internal/oobmigration/migrations/register.go
internal/oobmigration/oobmigrations.yaml

Copy link
Contributor

@courier-new courier-new left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but just wondering if the OOB migration is necessary for the role permission assignment? 🙂

@BolajiOlajide BolajiOlajide merged commit 8c63877 into main Feb 7, 2023
@BolajiOlajide BolajiOlajide deleted the bo/assign-permissions-to-roles branch February 7, 2023 15:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

batch-changes Issues related to Batch Changes cla-signed rbac

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create migration for assigning permissions to roles

4 participants