// SPDX-FileCopyrightText: Politik im Blick developers
// SPDX-FileCopyrightText: Wolfgang Silbermayr <wolfgang@silbermayr.at>
//
// SPDX-License-Identifier: AGPL-3.0-or-later OR EUPL-1.2

use crate::{Admission, Error, Method, Resource};
use pib_service_core_types::UserId;

#[cfg_attr(feature = "mockall", mockall::automock)]
#[async_trait::async_trait]
pub trait Permissions: Sync + Send + std::fmt::Debug {
    async fn request_permission(
        &self,
        resource: Resource,
        method: Method,
        user_id: UserId,
    ) -> Result<Admission, Error>;
}
