feat: complete Phase 0 Enterprise IAM
This commit is contained in:
1 parent
3d2d291006
commit
c2f5ba3f54
202 files changed
+21371
-1360
No files matched your search
@@ -6,8 +6,11 @@ pub struct Application {
|
||||
pub id: String,
|
||||
pub tenant_id: String,
|
||||
pub name: String,
|
||||
pub slug: String,
|
||||
pub description: Option<String>,
|
||||
pub slug: Option<String>,
|
||||
pub enabled: bool,
|
||||
pub client_secret_hash: Option<String>,
|
||||
pub redirect_uris: Option<String>,
|
||||
pub created_at: String,
|
||||
pub updated_at: String,
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use sqlx::FromRow;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, FromRow)]
|
||||
pub struct Group {
|
||||
pub id: String,
|
||||
pub tenant_id: String,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
pub created_at: String,
|
||||
pub updated_at: String,
|
||||
}
|
||||
@@ -18,3 +18,5 @@ pub use service_account::ServiceAccount;
|
||||
pub use session::Session;
|
||||
pub use tenant::Tenant;
|
||||
pub use user::{User, UserStatus};
|
||||
pub mod group;
|
||||
pub use group::Group;
|
||||
@@ -3,6 +3,7 @@ use sqlx::FromRow;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, FromRow)]
|
||||
pub struct Permission {
|
||||
pub slug: Option<String>,
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
|
||||
@@ -3,6 +3,7 @@ use sqlx::FromRow;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, FromRow)]
|
||||
pub struct Role {
|
||||
pub slug: Option<String>,
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub description: Option<String>,
|
||||
|
||||
@@ -3,6 +3,7 @@ use sqlx::FromRow;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, FromRow)]
|
||||
pub struct ServiceAccount {
|
||||
pub slug: Option<String>,
|
||||
pub id: String,
|
||||
pub tenant_id: String,
|
||||
pub name: String,
|
||||
|
||||
@@ -5,7 +5,7 @@ use sqlx::FromRow;
|
||||
pub struct Tenant {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub slug: String,
|
||||
pub slug: Option<String>,
|
||||
pub enabled: bool,
|
||||
pub created_at: String,
|
||||
pub updated_at: String,
|
||||
|
||||
@@ -43,6 +43,7 @@ impl std::fmt::Display for UserStatus {
|
||||
/// A user account row from the `users` table.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, FromRow)]
|
||||
pub struct User {
|
||||
pub slug: Option<String>,
|
||||
pub id: String,
|
||||
pub tenant_id: String,
|
||||
pub username: String,
|
||||
|
||||
Reference in new issue
Block a user