-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat(users): custom role at profile read #6875
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
Conversation
b573226
…ay/hyperswitch into custom-role-at-profile-read
469daa3
.filter(dsl::tenant_id.eq(tenant_id)) | ||
.filter(dsl::org_id.eq(org_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
take these filter out of the match statement. dry!
crates/diesel_models/src/role.rs
Outdated
Profile( | ||
id_type::OrganizationId, | ||
id_type::MerchantId, | ||
id_type::ProfileId, | ||
), | ||
Merchant(id_type::OrganizationId, id_type::MerchantId), | ||
Organization(id_type::OrganizationId), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can organisation_id be passed as a function argument instead of inside the enum.
} | ||
let (org_id, merchant_id, profile_id) = match role_entity_type { | ||
EntityType::Organization | EntityType::Tenant => { | ||
(user_from_token.org_id, user_from_token.merchant_id, None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably throw error here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will take this up in the next PR
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Gnanasundari24 <[email protected]>
Type of Change
Description
This pr adds the functionality to read custom role at profile level
Additional Changes
Motivation and Context
Closes #6488
How did you test it?
Request
Response
If a role with the same name is created either below me or in my lineage , then i wouldn't be able to create the role with that same name
Request
Response
Checklist
cargo +nightly fmt --all
cargo clippy