net.nemerosa.ontrack.model.security.AccountGroupMapping.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.form.Form
import net.nemerosa.ontrack.model.form.Form.Companion.create
import net.nemerosa.ontrack.model.form.Selection
import net.nemerosa.ontrack.model.structure.Entity
import net.nemerosa.ontrack.model.structure.ID
/**
* Defines a mapping between a provided group (by a LDAP system for example)
* and an actual Ontrack [group][AccountGroup].
*
* @property id Unique ID of this mapping
* @property authenticationSource Authentication source
* @property name Name of the provided group
* @property group ID of the [AccountGroup]
*/
data class AccountGroupMapping(
override val id: ID,
val authenticationSource: AuthenticationSource,
val name: String,
val group: AccountGroup
) : Entity {
fun asForm(groups: List): Form = form(groups)
.fill("name", name)
.fill("group", group.id)
companion object {
@JvmStatic
fun form(groups: List): Form = create()
.name()
.with(
Selection.of("group")
.label("Group")
.items(groups)
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy