darkwing::database::browser_profile_access::repository

Trait BrowserProfileAccessRepository

source
pub trait BrowserProfileAccessRepository {
    // Required methods
    fn get_by_user_id_and_browser_profile_id<'life0, 'async_trait>(
        &'life0 self,
        user_id: i64,
        browser_profile_id: i64,
    ) -> Pin<Box<dyn Future<Output = Result<Option<BrowserProfileAccess>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_teamlead_id_by_browser_profile<'life0, 'async_trait>(
        &'life0 self,
        browser_profile: MiniBrowserProfile,
    ) -> Pin<Box<dyn Future<Output = Result<Option<i64>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Defines the interface for accessing browser profile access data.

This trait provides methods to query browser profile access permissions and related teamlead information from the database.

Required Methods§

source

fn get_by_user_id_and_browser_profile_id<'life0, 'async_trait>( &'life0 self, user_id: i64, browser_profile_id: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<BrowserProfileAccess>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves browser profile access permissions for a specific user and profile.

§Arguments
  • user_id - The ID of the user whose permissions are being queried
  • browser_profile_id - The ID of the browser profile to check permissions for
§Returns
  • Ok(Some(BrowserProfileAccess)) if permissions are found
  • Ok(None) if no permissions exist
  • Err if there was a database error
source

fn get_teamlead_id_by_browser_profile<'life0, 'async_trait>( &'life0 self, browser_profile: MiniBrowserProfile, ) -> Pin<Box<dyn Future<Output = Result<Option<i64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Retrieves the teamlead ID associated with a browser profile.

§Arguments
  • browser_profile - The browser profile to look up teamlead information for
§Returns
  • Ok(Some(i64)) if a teamlead ID is found
  • Ok(None) if no teamlead relationship exists
  • Err if there was a database error

Implementors§

source§

impl BrowserProfileAccessRepository for Database

Implementation of BrowserProfileAccessRepository for the main database.

source§

impl BrowserProfileAccessRepository for MockBrowserProfileAccessRepository

Defines the interface for accessing browser profile access data.

This trait provides methods to query browser profile access permissions and related teamlead information from the database.