mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 21:07:58 +08:00
refactor(users): move roles schema to global interface (#6862)
This commit is contained in:
@ -190,7 +190,7 @@ pub async fn get_most_specific_theme_using_lineage(
|
||||
lineage: ThemeLineage,
|
||||
) -> UserResult<Option<Theme>> {
|
||||
match state
|
||||
.global_store
|
||||
.store
|
||||
.find_most_specific_theme_in_lineage(lineage)
|
||||
.await
|
||||
{
|
||||
@ -210,7 +210,7 @@ pub async fn get_theme_using_optional_theme_id(
|
||||
theme_id: Option<String>,
|
||||
) -> UserResult<Option<Theme>> {
|
||||
match theme_id
|
||||
.async_map(|theme_id| state.global_store.find_theme_by_theme_id(theme_id))
|
||||
.async_map(|theme_id| state.store.find_theme_by_theme_id(theme_id))
|
||||
.await
|
||||
.transpose()
|
||||
{
|
||||
|
||||
@ -57,7 +57,7 @@ pub async fn validate_role_name(
|
||||
|
||||
// TODO: Create and use find_by_role_name to make this efficient
|
||||
let is_present_in_custom_roles = state
|
||||
.store
|
||||
.global_store
|
||||
.list_all_roles(merchant_id, org_id)
|
||||
.await
|
||||
.change_context(UserErrors::InternalServerError)?
|
||||
|
||||
Reference in New Issue
Block a user