Skip to main content

windmill_api/models/
acl_source.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.817.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AclSource {
16    #[serde(rename = "role")]
17    pub role: String,
18    /// what role gave of the grant's privileges. A revoke is held back only by a source out of reach that gave some of what it takes back.
19    #[serde(rename = "privileges")]
20    pub privileges: Vec<String>,
21    /// whether the data table's connection can take back what role gave. On an object that is the owner, when the connection acts for the owner, and otherwise the connection itself; for a default privilege, a creating role the connection acts for. What a source out of reach gave is not revocable from here; privileges only other sources gave still are.
22    #[serde(rename = "reachable")]
23    pub reachable: bool,
24}
25
26impl AclSource {
27    pub fn new(role: String, privileges: Vec<String>, reachable: bool) -> AclSource {
28        AclSource {
29            role,
30            privileges,
31            reachable,
32        }
33    }
34}
35