feat(users): add global support in user roles (#6458)

This commit is contained in:
Apoorv Dixit
2024-11-13 12:21:03 +05:30
committed by GitHub
parent 596c49e111
commit 98b141c6a0
18 changed files with 211 additions and 34 deletions

View File

@ -92,6 +92,7 @@ pub async fn generate_jwt_auth_token_with_attributes(
org_id: id_type::OrganizationId,
role_id: String,
profile_id: id_type::ProfileId,
tenant_id: Option<String>,
) -> UserResult<Secret<String>> {
let token = AuthToken::new_token(
user_id,
@ -100,6 +101,7 @@ pub async fn generate_jwt_auth_token_with_attributes(
&state.conf,
org_id,
Some(profile_id),
tenant_id,
)
.await?;
Ok(Secret::new(token))