net.nemerosa.ontrack.model.security.ProjectRole.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-model Show documentation
Show all versions of ontrack-model Show documentation
Ontrack module: ontrack-model
package net.nemerosa.ontrack.model.security
import java.io.Serializable
/**
* A project role is the association between an identifier, a name and a set of
* [project functions][net.nemerosa.ontrack.model.security.ProjectFunction].
*/
data class ProjectRole(
/**
* Project role's identifier
*/
val id: String,
/**
* Project role's name
*/
val name: String,
/**
* Description
*/
val description: String,
/**
* Associated set of project functions
*/
val functions: Set>) : Serializable {
fun isGranted(functionToCheck: Class): Boolean =
functions.any { functionToCheck.isAssignableFrom(it) }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy