conversions7
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user