conversions7
This commit is contained in:
@@ -507,7 +507,7 @@ grants-note-all-tables = Každá tabulka v každém profilu včetně těch, kter
|
||||
grants-label-all-journals = Všechny deníky
|
||||
grants-note-all-journals = Účetní deník každého profilu.
|
||||
grants-label-all-rates = Všechny devizové kurzy
|
||||
grants-note-all-rates = Kurzy ECB importuje server, takže je lze pouze číst.
|
||||
grants-note-all-rates = Oficiální kurzy importuje server, takže je lze pouze číst.
|
||||
grants-note-profile-tables = Každá tabulka v tomto profilu včetně těch, které přibudou později.
|
||||
grants-label-journal = Deník
|
||||
grants-note-journal = Účetní deník tohoto profilu.
|
||||
@@ -755,7 +755,7 @@ builder-choose-profile = Vyberte profil
|
||||
builder-new-profile = Nový profil…
|
||||
builder-new-profile-name = Název nového profilu
|
||||
builder-accounting-currency = Účetní měna
|
||||
builder-accounting-currency-hint = Účetnictví může být vedeno v jakékoli měně, pro kterou ECB zveřejňuje referenční kurz. Jiná měna než EUR se v případě potřeby přepočítá přes EUR, protože kurzy ECB jsou vždy vyjádřeny vůči euru.
|
||||
builder-accounting-currency-hint = Vybraný počáteční zdroj kurzů musí zveřejňovat přímý kurz mezi touto měnou a každou počáteční cizí měnou. Další zdroje a měny lze přidat později.
|
||||
builder-table-name = Název tabulky
|
||||
builder-add-column-heading = Přidat sloupec
|
||||
builder-add-column-button = Přidat sloupec
|
||||
|
||||
@@ -500,7 +500,7 @@ grants-note-all-tables = Every table in every profile, including ones added late
|
||||
grants-label-all-journals = All journals
|
||||
grants-note-all-journals = Every profile's accounting journal.
|
||||
grants-label-all-rates = All exchange rates
|
||||
grants-note-all-rates = ECB rates are imported by the server, so they can only be read.
|
||||
grants-note-all-rates = Official rates are imported by the server, so they can only be read.
|
||||
grants-note-profile-tables = Every table in this profile, including ones added later.
|
||||
grants-label-journal = Journal
|
||||
grants-note-journal = This profile's accounting journal.
|
||||
@@ -743,7 +743,7 @@ builder-choose-profile = Choose a profile
|
||||
builder-new-profile = New profile…
|
||||
builder-new-profile-name = New profile name
|
||||
builder-accounting-currency = Accounting currency
|
||||
builder-accounting-currency-hint = Books can be kept in any currency ECB publishes a reference rate for. A currency other than EUR is converted through EUR when needed, since ECB rates are always quoted against the euro.
|
||||
builder-accounting-currency-hint = The selected initial rate source must publish a direct quote between this currency and every initial foreign currency. Additional sources and currencies can be added later.
|
||||
builder-table-name = Table name
|
||||
builder-add-column-heading = Add a column
|
||||
builder-add-column-button = Add column
|
||||
|
||||
@@ -507,7 +507,7 @@ grants-note-all-tables = Každá tabuľka v každom profile vrátane tých, ktor
|
||||
grants-label-all-journals = Všetky denníky
|
||||
grants-note-all-journals = Účtovný denník každého profilu.
|
||||
grants-label-all-rates = Všetky devízové kurzy
|
||||
grants-note-all-rates = Kurzy ECB importuje server, takže ich možno len čítať.
|
||||
grants-note-all-rates = Oficiálne kurzy importuje server, takže ich možno len čítať.
|
||||
grants-note-profile-tables = Každá tabuľka v tomto profile vrátane tých, ktoré pribudnú neskôr.
|
||||
grants-label-journal = Denník
|
||||
grants-note-journal = Účtovný denník tohto profilu.
|
||||
@@ -753,7 +753,7 @@ builder-choose-profile = Vyberte profil
|
||||
builder-new-profile = Nový profil…
|
||||
builder-new-profile-name = Názov nového profilu
|
||||
builder-accounting-currency = Účtovná mena
|
||||
builder-accounting-currency-hint = Účtovníctvo môže byť vedené v akejkoľvek mene, pre ktorú ECB zverejňuje referenčný kurz. Iná mena ako EUR sa v prípade potreby prepočíta cez EUR, keďže kurzy ECB sú vždy vyjadrené voči euru.
|
||||
builder-accounting-currency-hint = Vybraný počiatočný zdroj kurzov musí zverejňovať priamy kurz medzi touto menou a každou počiatočnou cudzou menou. Ďalšie zdroje a meny možno pridať neskôr.
|
||||
builder-table-name = Názov tabuľky
|
||||
builder-add-column-heading = Pridať stĺpec
|
||||
builder-add-column-button = Pridať stĺpec
|
||||
|
||||
@@ -9,9 +9,8 @@ pub(crate) const STRUCT_USER: &str = "struct:user";
|
||||
pub(crate) const MANAGE: &str = "manage";
|
||||
pub(crate) const READ: &str = "read";
|
||||
|
||||
/// Every ECB object, which is what the pipeline status is checked against:
|
||||
/// one importer feeds every profile, so reading its health is not a
|
||||
/// per-profile question.
|
||||
/// Every exchange-rate object. Provider pipeline health is a global rather
|
||||
/// than per-profile concern.
|
||||
pub(crate) const ALL_EXCHANGE_RATES: &str = "exchange-rates:*";
|
||||
|
||||
/// The two bulk-transfer actions, mirroring
|
||||
@@ -43,7 +42,7 @@ pub(crate) fn can_manage(snapshot: &AuthorizationSnapshot, area: &str) -> bool {
|
||||
}
|
||||
|
||||
/// Whether the caller may see the reference-rate pipeline. Mirrors the
|
||||
/// server's own check in `server/src/ecb/grpc.rs`.
|
||||
/// server's exchange-rate authorization check.
|
||||
pub(crate) fn can_read_exchange_rates(snapshot: &AuthorizationSnapshot) -> bool {
|
||||
permits(snapshot, ALL_EXCHANGE_RATES, READ)
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ pub(crate) struct AdminPageState {
|
||||
pub can_import: bool,
|
||||
pub can_export: bool,
|
||||
/// Whether the exchange-rate pipeline is visible to this caller. Not a
|
||||
/// structural area: it is granted through the ECB object, like the
|
||||
/// structural area: it is granted through the exchange-rate object, like the
|
||||
/// conversions it reports on.
|
||||
pub can_exchange_rates: bool,
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ fn describe(locale: Locale, object: &GrantableObject) -> (String, String) {
|
||||
tr!(locale, "grants-label-all-journals"),
|
||||
tr!(locale, "grants-note-all-journals"),
|
||||
),
|
||||
"global_ecb" => (
|
||||
"global_exchange_rates" => (
|
||||
tr!(locale, "grants-label-all-rates"),
|
||||
tr!(locale, "grants-note-all-rates"),
|
||||
),
|
||||
@@ -193,7 +193,7 @@ fn describe(locale: Locale, object: &GrantableObject) -> (String, String) {
|
||||
tr!(locale, "grants-label-journal"),
|
||||
tr!(locale, "grants-note-journal"),
|
||||
),
|
||||
"ecb" => (
|
||||
"exchange_rates" => (
|
||||
tr!(locale, "grants-label-rates"),
|
||||
tr!(locale, "grants-note-rates"),
|
||||
),
|
||||
|
||||
@@ -229,7 +229,7 @@ mod tests {
|
||||
},
|
||||
ObjectRow {
|
||||
object: "exchange-rates:acme".to_string(),
|
||||
label: "ECB rates".to_string(),
|
||||
label: "Exchange rates".to_string(),
|
||||
note: String::new(),
|
||||
wildcard: true,
|
||||
cells: cells(&["read"], &[]),
|
||||
@@ -249,7 +249,7 @@ mod tests {
|
||||
fn a_profile_shortcut_grants_the_wildcards_and_never_an_action_the_server_refuses() {
|
||||
let group = group();
|
||||
// The table row is covered by data:acme/*, so it is not granted again,
|
||||
// and ECB rates only ever offer read.
|
||||
// and official rates only ever offer read.
|
||||
assert_eq!(
|
||||
group.all_pairs(),
|
||||
vec![
|
||||
|
||||
@@ -71,8 +71,8 @@ impl RoleRow {
|
||||
///
|
||||
/// These are wildcard objects on purpose: they keep covering profiles and
|
||||
/// tables added later, which is what "everything" has to mean for a role
|
||||
/// created before the data exists. ECB rates are written by the server, so they
|
||||
/// are readable and nothing more.
|
||||
/// created before the data exists. Official rates are written by the server,
|
||||
/// so they are readable and nothing more.
|
||||
pub(crate) fn starter_grants(
|
||||
locale: Locale,
|
||||
access: &str,
|
||||
@@ -110,7 +110,7 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn starter_access_never_hands_out_a_write_on_ecb_rates() {
|
||||
fn starter_access_never_hands_out_a_write_on_exchange_rates() {
|
||||
let locale = Locale::default();
|
||||
assert!(starter_grants(locale, "none").unwrap().is_empty());
|
||||
assert!(starter_grants(locale, "nonsense").is_err());
|
||||
@@ -121,12 +121,12 @@ mod tests {
|
||||
grants
|
||||
.iter()
|
||||
.all(|(object, action)| *object != "exchange-rates:*" || *action == "read"),
|
||||
"{level} granted a write on ECB rates"
|
||||
"{level} granted a write on exchange rates"
|
||||
);
|
||||
}
|
||||
|
||||
assert_eq!(starter_grants(locale, "read").unwrap().len(), 3);
|
||||
// Four row actions on two wildcard objects, ECB read, and the two
|
||||
// Four row actions on two wildcard objects, rate read, and the two
|
||||
// transfer actions, which apply to tables alone.
|
||||
assert_eq!(starter_grants(locale, "full").unwrap().len(), 11);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user