mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
chore(users): change entity_type column of roles to non-optional (#6435)
This commit is contained in:
@ -92,7 +92,7 @@ pub async fn create_role(
|
||||
org_id: user_from_token.org_id,
|
||||
groups: req.groups,
|
||||
scope: req.role_scope,
|
||||
entity_type: Some(EntityType::Merchant),
|
||||
entity_type: EntityType::Merchant,
|
||||
created_by: user_from_token.user_id.clone(),
|
||||
last_modified_by: user_from_token.user_id,
|
||||
created_at: now,
|
||||
|
||||
@ -354,7 +354,7 @@ impl RoleInterface for MockDb {
|
||||
None => true,
|
||||
};
|
||||
|
||||
matches_merchant && role.org_id == *org_id && role.entity_type == entity_type
|
||||
matches_merchant && role.org_id == *org_id && Some(role.entity_type) == entity_type
|
||||
})
|
||||
.take(limit_usize)
|
||||
.cloned()
|
||||
|
||||
@ -119,7 +119,7 @@ impl From<diesel_models::role::Role> for RoleInfo {
|
||||
role_name: role.role_name,
|
||||
groups: role.groups.into_iter().map(Into::into).collect(),
|
||||
scope: role.scope,
|
||||
entity_type: role.entity_type.unwrap_or(EntityType::Merchant),
|
||||
entity_type: role.entity_type,
|
||||
is_invitable: true,
|
||||
is_deletable: true,
|
||||
is_updatable: true,
|
||||
|
||||
Reference in New Issue
Block a user