Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(roles): remove redundant variant from PermissionGroup #6985

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kashif-m
Copy link
Contributor

@kashif-m kashif-m commented Jan 3, 2025

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This removes the redundant ReconOps variant from PermissionGroup enum which is stored in DB. This was kept back in application for backwards compatibility. Migrations are added for this and this will not be needed anymore.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

Helps in keeping a clean permission view on HS dashboard.

How did you test it?

Locally by running migrations and viewing permission view in dashboard.

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@kashif-m kashif-m self-assigned this Jan 3, 2025
@kashif-m kashif-m requested a review from a team as a code owner January 3, 2025 10:45
@kashif-m kashif-m linked an issue Jan 3, 2025 that may be closed by this pull request
2 tasks
Copy link

semanticdiff-com bot commented Jan 3, 2025

@hyperswitch-bot hyperswitch-bot bot added the M-database-changes Metadata: This PR involves database schema changes label Jan 3, 2025
@kashif-m kashif-m requested a review from a team as a code owner January 3, 2025 12:24
@@ -0,0 +1 @@
SELECT 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we replace the groups back here? If someone rolls back to older version, new variant wouldn't work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We cannot revert the groups back, this is a one time activity for renaming recon_ops to recon_ops_manage. Once this is done, we will lose context of which groups were recon_ops, and that's expected since application expects recon_ops_manage

If someone rolls back to an older version of the application, it will work regardless since we've had the new variant (ReconOpsManage) for a while.

Copy link
Contributor

Choose a reason for hiding this comment

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

But I don't see any issue in replacing either... If someone reverts to the version where ReconOpsManage is not present, then it wouldn't work without replacing.

I would not expect anyone to do so. But, this is something I can think of which will give us advantage without any downsides...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CHORE] remove redundant variants from PermissionGroup
3 participants