From ae88dac1bf729616046d7d89371f9913836efa64 Mon Sep 17 00:00:00 2001 From: FyloZ Date: Mon, 15 Mar 2021 19:30:02 -0400 Subject: [PATCH] =?UTF-8?q?Ajout=20des=20permissions=20explicites=20dans?= =?UTF-8?q?=20les=20employ=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fyloz/trial/colorrecipesexplorer/model/AccountModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/dev/fyloz/trial/colorrecipesexplorer/model/AccountModel.kt b/src/main/kotlin/dev/fyloz/trial/colorrecipesexplorer/model/AccountModel.kt index d00cd6b..9d47a49 100644 --- a/src/main/kotlin/dev/fyloz/trial/colorrecipesexplorer/model/AccountModel.kt +++ b/src/main/kotlin/dev/fyloz/trial/colorrecipesexplorer/model/AccountModel.kt @@ -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 = mutableSetOf(), @Column(name = "last_login_time") @@ -147,7 +147,7 @@ data class EmployeeGroup( val employees: MutableSet = 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)