All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.radarbase.auth.authorization.EntityRelationService.kt Maven / Gradle / Ivy

package org.radarbase.auth.authorization

/** Service to determine the relationship between entities. */
interface EntityRelationService {
    /**
     * From a [project] name, return an organization name.
     * @return organization name if found, null otherwise.
     */
    suspend fun findOrganizationOfProject(project: String): String?

    /** Whether given [organization] name has a [project] with given name. */
    suspend fun organizationContainsProject(organization: String, project: String): Boolean =
        findOrganizationOfProject(project) == organization
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy