From 97e76365b755aa309071ea04a76d72d0c630d336 Mon Sep 17 00:00:00 2001 From: Schami Date: Fri, 13 Dec 2024 19:43:15 +0100 Subject: [PATCH] Make more extendable --- backend/build.gradle.kts | 46 +++++++++---------- .../cmsch/admin/dashboard/DashboardPage.kt | 14 +++--- .../bme/sch/cmsch/component/ComponentBase.kt | 2 +- .../sch/cmsch/service/PermissionsService.kt | 2 +- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/backend/build.gradle.kts b/backend/build.gradle.kts index 7c9bc5bca..7df6114b6 100644 --- a/backend/build.gradle.kts +++ b/backend/build.gradle.kts @@ -39,31 +39,31 @@ repositories { dependencies { implementation("com.google.firebase:firebase-admin:9.3.0") implementation("jakarta.xml.bind:jakarta.xml.bind-api:4.0.2") - api("org.springframework.boot:spring-boot-configuration-processor") - api("org.springframework.boot:spring-boot-starter-data-jpa") - api("org.springframework.boot:spring-boot-starter-oauth2-client") - api("org.springframework.boot:spring-boot-starter-security") - api("org.springframework.boot:spring-boot-starter-web") - api("org.springframework.boot:spring-boot-starter-webflux") - api("org.springframework.boot:spring-boot-starter-thymeleaf") - api("org.springframework.boot:spring-boot-starter-actuator") - api("org.springframework.retry:spring-retry") - api("org.springframework.boot:spring-boot-starter-aop") - api("com.fasterxml.jackson.module:jackson-module-kotlin") - api("com.squareup.okhttp3:okhttp:4.12.0") - api("com.itextpdf:itext-core:8.0.5") - api("org.jetbrains.kotlin:kotlin-reflect") - api("org.jetbrains.kotlin:kotlin-stdlib-jdk8") - api("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0") - api("com.google.zxing:core:3.5.3") - api("com.google.zxing:javase:3.5.3") - api("io.jsonwebtoken:jjwt-api:0.12.6") + implementation("org.springframework.boot:spring-boot-configuration-processor") + implementation("org.springframework.boot:spring-boot-starter-data-jpa") + implementation("org.springframework.boot:spring-boot-starter-oauth2-client") + implementation("org.springframework.boot:spring-boot-starter-security") + implementation("org.springframework.boot:spring-boot-starter-web") + implementation("org.springframework.boot:spring-boot-starter-webflux") + implementation("org.springframework.boot:spring-boot-starter-thymeleaf") + implementation("org.springframework.boot:spring-boot-starter-actuator") + implementation("org.springframework.retry:spring-retry") + implementation("org.springframework.boot:spring-boot-starter-aop") + implementation("com.fasterxml.jackson.module:jackson-module-kotlin") + implementation("com.squareup.okhttp3:okhttp:4.12.0") + implementation("com.itextpdf:itext-core:8.0.5") + implementation("org.jetbrains.kotlin:kotlin-reflect") + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") + implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0") + implementation("com.google.zxing:core:3.5.3") + implementation("com.google.zxing:javase:3.5.3") + implementation("io.jsonwebtoken:jjwt-api:0.12.6") runtimeOnly("io.jsonwebtoken:jjwt-impl:0.12.6") runtimeOnly("io.jsonwebtoken:jjwt-jackson:0.12.6") - api("com.fasterxml.uuid:java-uuid-generator:5.1.0") - api("org.commonmark:commonmark:0.22.0") - api("org.commonmark:commonmark-ext-gfm-tables:0.22.0") - api("com.fasterxml.jackson.dataformat:jackson-dataformat-csv") + implementation("com.fasterxml.uuid:java-uuid-generator:5.1.0") + implementation("org.commonmark:commonmark:0.22.0") + implementation("org.commonmark:commonmark-ext-gfm-tables:0.22.0") + implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-csv") developmentOnly("org.springframework.boot:spring-boot-devtools") annotationProcessor("org.springframework.boot:spring-boot-configuration-processor") runtimeOnly("com.h2database:h2") diff --git a/backend/src/main/kotlin/hu/bme/sch/cmsch/admin/dashboard/DashboardPage.kt b/backend/src/main/kotlin/hu/bme/sch/cmsch/admin/dashboard/DashboardPage.kt index f4260176b..a93c19b78 100644 --- a/backend/src/main/kotlin/hu/bme/sch/cmsch/admin/dashboard/DashboardPage.kt +++ b/backend/src/main/kotlin/hu/bme/sch/cmsch/admin/dashboard/DashboardPage.kt @@ -21,16 +21,16 @@ import java.net.URLEncoder import java.nio.charset.StandardCharsets abstract class DashboardPage( - internal var view: String, - internal var title: String, - internal var description: String, - internal var wide: Boolean, + var view: String, + var title: String, + var description: String, + var wide: Boolean, private var adminMenuService: AdminMenuService, - internal var component: ComponentBase, - internal var auditLog: AuditLogService, + var component: ComponentBase, + var auditLog: AuditLogService, - internal var showPermission: PermissionValidator, + var showPermission: PermissionValidator, private var adminMenuCategory: String? = null, private var adminMenuIcon: String = "check_box_outline_blank", diff --git a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/ComponentBase.kt b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/ComponentBase.kt index 1f63454c4..cfd244dc7 100644 --- a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/ComponentBase.kt +++ b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/ComponentBase.kt @@ -32,7 +32,7 @@ abstract class ComponentBase( abstract val minRole: MinRoleSettingProxy - internal abstract val allSettings: List + abstract val allSettings: List val menuPriority: Int get() = env.getProperty("hu.bme.sch.cmsch.${component}.priority")?.toIntOrNull() ?: 0 diff --git a/backend/src/main/kotlin/hu/bme/sch/cmsch/service/PermissionsService.kt b/backend/src/main/kotlin/hu/bme/sch/cmsch/service/PermissionsService.kt index 20f9d089d..95a1a57a3 100644 --- a/backend/src/main/kotlin/hu/bme/sch/cmsch/service/PermissionsService.kt +++ b/backend/src/main/kotlin/hu/bme/sch/cmsch/service/PermissionsService.kt @@ -49,7 +49,7 @@ class PermissionsService( final val allPermissions = listOf(allControlPermissions, allStaffPermissions).flatten() } -class PermissionValidator internal constructor( +class PermissionValidator constructor( val permissionString: String = "", val description: String = "", val component: KClass? = null,