From 3406b370fe290559ff2445097a380d6f48d0f9af Mon Sep 17 00:00:00 2001 From: benj Date: Mon, 12 Jun 2023 15:39:10 -0700 Subject: 🤮: add check_list_namespaces as a temporary hack while using spice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/secd/src/lib.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'crates/secd/src/lib.rs') diff --git a/crates/secd/src/lib.rs b/crates/secd/src/lib.rs index eb5d33d..c84ce44 100644 --- a/crates/secd/src/lib.rs +++ b/crates/secd/src/lib.rs @@ -3,7 +3,7 @@ mod client; mod util; use async_trait::async_trait; -use auth::z::Relationship; +use auth::z::{Namespace, Relation, Relationship, Subject}; use client::{ email::{EmailMessenger, EmailMessengerError, LocalMailer, Sendgrid}, spice::{Spice, SpiceError}, @@ -145,9 +145,13 @@ pub trait Authentication { #[async_trait] pub trait Authorization { async fn check(&self, r: &Relationship) -> Result; - async fn expand(&self) -> Result<(), SecdError>; - async fn read(&self) -> Result<(), SecdError>; - async fn watch(&self) -> Result<(), SecdError>; + async fn check_list_namespaces( + &self, + ns: &Namespace, + subj: &Subject, + relation: &Relation, + ) -> Result, SecdError>; + async fn check_list_subjects(&self) -> Result, SecdError>; async fn write(&self, relationships: &[Relationship]) -> Result<(), SecdError>; } -- cgit v1.2.3