Ajout des permissions explicites dans les employés
This commit is contained in:
parent
af9c7ca092
commit
ae88dac1bf
|
@ -56,7 +56,7 @@ data class Employee(
|
|||
@CollectionTable(name = "employee_permission", joinColumns = [JoinColumn(name = "employee_id")])
|
||||
@Column(name = "permission")
|
||||
@Fetch(FetchMode.SUBSELECT)
|
||||
@get:JsonIgnore
|
||||
@get:JsonProperty("explicitPermissions")
|
||||
val permissions: MutableSet<EmployeePermission> = mutableSetOf(),
|
||||
|
||||
@Column(name = "last_login_time")
|
||||
|
@ -147,7 +147,7 @@ data class EmployeeGroup(
|
|||
val employees: MutableSet<Employee> = mutableSetOf()
|
||||
) : NamedModel {
|
||||
@JsonProperty("employeeCount")
|
||||
fun getEmployeeCount() = employees.size
|
||||
fun getEmployeeCount() = employees.size - 1 // Remove the default employee
|
||||
|
||||
override fun equals(other: Any?): Boolean = other is EmployeeGroup && id == other.id && name == other.name
|
||||
override fun hashCode(): Int = Objects.hash(id, name)
|
||||
|
|
Loading…
Reference in New Issue