perf(struct): ddd

This commit is contained in:
2026-02-03 17:31:08 +08:00
parent 202b5eaad5
commit 4a071bd7c8
64 changed files with 1214 additions and 1189 deletions

View File

@@ -1,11 +1,12 @@
use iam_service::application::services::{
AuthService, AuthorizationService, RoleService, TenantService,
};
use iam_service::models::{CreateRoleRequest, CreateTenantRequest, CreateUserRequest};
use iam_service::services::{AuthService, AuthorizationService, RoleService, TenantService};
use sqlx::PgPool;
use uuid::Uuid;
#[tokio::test]
async fn role_permission_grant_and_wildcard_match()
-> Result<(), Box<dyn std::error::Error>> {
async fn role_permission_grant_and_wildcard_match() -> Result<(), Box<dyn std::error::Error>> {
let database_url = match std::env::var("DATABASE_URL") {
Ok(v) if !v.trim().is_empty() => v,
_ => return Ok(()),
@@ -71,12 +72,7 @@ async fn role_permission_grant_and_wildcard_match()
.await?;
role_service
.grant_permissions_to_role(
tenant.id,
role.id,
vec!["cms:*:*".to_string()],
admin.id,
)
.grant_permissions_to_role(tenant.id, role.id, vec!["cms:*:*".to_string()], admin.id)
.await?;
role_service
@@ -89,4 +85,3 @@ async fn role_permission_grant_and_wildcard_match()
Ok(())
}