modules can expose data to other modules from now on
This commit is contained in:
@@ -140,6 +140,7 @@ message SetModuleConfigurationRequest {
|
||||
// Initializes an existing profile's bookkeeping currency. Empty leaves it unchanged.
|
||||
// Defaults scope and changes to an already configured currency are rejected.
|
||||
string accounting_currency = 3;
|
||||
repeated ModuleDataAccessUpdate data_access_updates = 4;
|
||||
}
|
||||
|
||||
message ModuleConfiguration {
|
||||
@@ -148,6 +149,31 @@ message ModuleConfiguration {
|
||||
repeated string selected_modules = 3;
|
||||
repeated string effective_modules = 5;
|
||||
string accounting_currency = 6;
|
||||
repeated ModuleDataAccessRequest data_access_requests = 7;
|
||||
}
|
||||
|
||||
enum ModuleDataPermission {
|
||||
MODULE_DATA_PERMISSION_UNSPECIFIED = 0;
|
||||
MODULE_DATA_PERMISSION_ACCOUNTING_PERIOD_BALANCES = 1;
|
||||
}
|
||||
|
||||
enum ModuleDataAccessDecision {
|
||||
MODULE_DATA_ACCESS_DECISION_UNSPECIFIED = 0;
|
||||
MODULE_DATA_ACCESS_DECISION_ALLOW = 1;
|
||||
MODULE_DATA_ACCESS_DECISION_REVOKE = 2;
|
||||
}
|
||||
|
||||
message ModuleDataAccessRequest {
|
||||
string requesting_module = 1;
|
||||
string providing_module = 2;
|
||||
ModuleDataPermission permission = 3;
|
||||
bool granted = 4;
|
||||
}
|
||||
|
||||
message ModuleDataAccessUpdate {
|
||||
string requesting_module = 1;
|
||||
ModuleDataPermission permission = 2;
|
||||
ModuleDataAccessDecision decision = 3;
|
||||
}
|
||||
|
||||
message CreateCustomExchangeRatesTableRequest {
|
||||
|
||||
Binary file not shown.
@@ -40,7 +40,7 @@ pub struct GetModuleConfigurationRequest {
|
||||
}
|
||||
/// Profile updates require an existing profile. Defaults affect future profiles only.
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct SetModuleConfigurationRequest {
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub scope: ::core::option::Option<ModuleScope>,
|
||||
@@ -50,9 +50,11 @@ pub struct SetModuleConfigurationRequest {
|
||||
/// Defaults scope and changes to an already configured currency are rejected.
|
||||
#[prost(string, tag = "3")]
|
||||
pub accounting_currency: ::prost::alloc::string::String,
|
||||
#[prost(message, repeated, tag = "4")]
|
||||
pub data_access_updates: ::prost::alloc::vec::Vec<ModuleDataAccessUpdate>,
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ModuleConfiguration {
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub scope: ::core::option::Option<ModuleScope>,
|
||||
@@ -64,6 +66,30 @@ pub struct ModuleConfiguration {
|
||||
pub effective_modules: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
|
||||
#[prost(string, tag = "6")]
|
||||
pub accounting_currency: ::prost::alloc::string::String,
|
||||
#[prost(message, repeated, tag = "7")]
|
||||
pub data_access_requests: ::prost::alloc::vec::Vec<ModuleDataAccessRequest>,
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct ModuleDataAccessRequest {
|
||||
#[prost(string, tag = "1")]
|
||||
pub requesting_module: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub providing_module: ::prost::alloc::string::String,
|
||||
#[prost(enumeration = "ModuleDataPermission", tag = "3")]
|
||||
pub permission: i32,
|
||||
#[prost(bool, tag = "4")]
|
||||
pub granted: bool,
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
pub struct ModuleDataAccessUpdate {
|
||||
#[prost(string, tag = "1")]
|
||||
pub requesting_module: ::prost::alloc::string::String,
|
||||
#[prost(enumeration = "ModuleDataPermission", tag = "2")]
|
||||
pub permission: i32,
|
||||
#[prost(enumeration = "ModuleDataAccessDecision", tag = "3")]
|
||||
pub decision: i32,
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
|
||||
@@ -1121,6 +1147,67 @@ pub mod list_column_types_response {
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
#[repr(i32)]
|
||||
pub enum ModuleDataPermission {
|
||||
Unspecified = 0,
|
||||
AccountingPeriodBalances = 1,
|
||||
}
|
||||
impl ModuleDataPermission {
|
||||
/// String value of the enum field names used in the ProtoBuf definition.
|
||||
///
|
||||
/// The values are not transformed in any way and thus are considered stable
|
||||
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
|
||||
pub fn as_str_name(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Unspecified => "MODULE_DATA_PERMISSION_UNSPECIFIED",
|
||||
Self::AccountingPeriodBalances => {
|
||||
"MODULE_DATA_PERMISSION_ACCOUNTING_PERIOD_BALANCES"
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Creates an enum from field names used in the ProtoBuf definition.
|
||||
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
||||
match value {
|
||||
"MODULE_DATA_PERMISSION_UNSPECIFIED" => Some(Self::Unspecified),
|
||||
"MODULE_DATA_PERMISSION_ACCOUNTING_PERIOD_BALANCES" => {
|
||||
Some(Self::AccountingPeriodBalances)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
#[repr(i32)]
|
||||
pub enum ModuleDataAccessDecision {
|
||||
Unspecified = 0,
|
||||
Allow = 1,
|
||||
Revoke = 2,
|
||||
}
|
||||
impl ModuleDataAccessDecision {
|
||||
/// String value of the enum field names used in the ProtoBuf definition.
|
||||
///
|
||||
/// The values are not transformed in any way and thus are considered stable
|
||||
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
|
||||
pub fn as_str_name(&self) -> &'static str {
|
||||
match self {
|
||||
Self::Unspecified => "MODULE_DATA_ACCESS_DECISION_UNSPECIFIED",
|
||||
Self::Allow => "MODULE_DATA_ACCESS_DECISION_ALLOW",
|
||||
Self::Revoke => "MODULE_DATA_ACCESS_DECISION_REVOKE",
|
||||
}
|
||||
}
|
||||
/// Creates an enum from field names used in the ProtoBuf definition.
|
||||
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
|
||||
match value {
|
||||
"MODULE_DATA_ACCESS_DECISION_UNSPECIFIED" => Some(Self::Unspecified),
|
||||
"MODULE_DATA_ACCESS_DECISION_ALLOW" => Some(Self::Allow),
|
||||
"MODULE_DATA_ACCESS_DECISION_REVOKE" => Some(Self::Revoke),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
#[derive(serde::Serialize, serde::Deserialize)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
|
||||
#[repr(i32)]
|
||||
pub enum InvoiceTemplateAccountingRole {
|
||||
Unspecified = 0,
|
||||
InvoiceTemplateAccountingName = 1,
|
||||
|
||||
Reference in New Issue
Block a user