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

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

package net.nemerosa.ontrack.model.security

import net.nemerosa.ontrack.model.structure.ProjectEntity

/**
 * More Kotlin-friendly call to [SecurityService]
 */
@Deprecated("Native methods can be used instead.", replaceWith = ReplaceWith("asAdmin"))
fun  SecurityService.callAsAdmin(call: () -> T): T = asAdmin(call)

inline fun  SecurityService.isProjectFunctionGranted(e: ProjectEntity) =
        isProjectFunctionGranted(e, F::class.java)

inline fun  SecurityService.isGlobalFunctionGranted() =
        isGlobalFunctionGranted(F::class.java)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy