[pdm-devel] [PATCH yew-comp 1/3] api-types/role_selector: depend on common `RoleInfo` type
Shannon Sterz
s.sterz at proxmox.com
Thu Apr 3 16:18:02 CEST 2025
instead of redefining it here. this should make sure that we stay in
sync with the common api definition in `proxmox-access-control`.
Signed-off-by: Shannon Sterz <s.sterz at proxmox.com>
---
src/common_api_types.rs | 8 --------
src/role_selector.rs | 2 +-
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/common_api_types.rs b/src/common_api_types.rs
index 58aec58..7b22bb3 100644
--- a/src/common_api_types.rs
+++ b/src/common_api_types.rs
@@ -24,14 +24,6 @@ impl ExtractPrimaryKey for BasicRealmInfo {
}
}
-#[derive(Serialize, Deserialize, PartialEq, Clone)]
-pub struct RoleInfo {
- pub roleid: String,
- pub privs: Vec<String>,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub comment: Option<String>,
-}
-
// copied from pbs_api_types::TaskListItem;
#[derive(Serialize, Deserialize, Clone, PartialEq)]
/// Task properties.
diff --git a/src/role_selector.rs b/src/role_selector.rs
index 7bde09f..20a8483 100644
--- a/src/role_selector.rs
+++ b/src/role_selector.rs
@@ -10,7 +10,7 @@ use pwt::widget::data_table::{DataTable, DataTableColumn, DataTableHeader};
use pwt::widget::form::{Selector, SelectorRenderArgs, ValidateFn};
use pwt::widget::GridPicker;
-use crate::common_api_types::RoleInfo;
+use proxmox_access_control::types::RoleInfo;
thread_local! {
static COLUMNS: Rc<Vec<DataTableHeader<RoleInfo>>> = Rc::new(vec![
--
2.39.5
More information about the pdm-devel
mailing list