diff --git a/CHANGELOG.md b/CHANGELOG.md index 553c1a67..b1688053 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Unreleased +- Show Global Permissions in `get users` - Upgrade `ordered-float` version, which is exposed in the public crate api. ## v0.19.0 diff --git a/api/src/resources/user.rs b/api/src/resources/user.rs index e963bf7f..dfa7aec2 100644 --- a/api/src/resources/user.rs +++ b/api/src/resources/user.rs @@ -87,6 +87,7 @@ pub struct User { pub global_permissions: HashSet, #[serde(rename = "organisation_permissions")] pub project_permissions: HashMap>, + pub sso_global_permissions: HashSet, pub verified: bool, } diff --git a/cli/src/printer.rs b/cli/src/printer.rs index edc9d07f..375f49e5 100644 --- a/cli/src/printer.rs +++ b/cli/src/printer.rs @@ -212,7 +212,7 @@ impl DisplayTable for Stream { impl DisplayTable for User { fn to_table_headers() -> Row { - row![bFg => "Name", "Email", "ID", "Created (UTC)"] + row![bFg => "Name", "Email", "ID", "Created (UTC)", "Global Permissions"] } fn to_table_row(&self) -> Row { @@ -221,6 +221,12 @@ impl DisplayTable for User { self.email.0, self.id.0, self.created_at.format("%Y-%m-%d %H:%M:%S"), + self.global_permissions + .iter() + .chain(self.sso_global_permissions.iter()) + .map(|permission| permission.to_string()) + .collect::>() + .join(", ") ] } }