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

net.nemerosa.ontrack.model.security.ProjectRole.kt Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
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