net.nemerosa.ontrack.model.security.SecurityServiceExtensions.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 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