Skip to content

Commit

Permalink
Make more extendable
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerviba committed Dec 13, 2024
1 parent 45e5885 commit f9adbfd
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
46 changes: 23 additions & 23 deletions backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ abstract class ComponentBase(

abstract val minRole: MinRoleSettingProxy

internal abstract val allSettings: List<SettingProxy>
abstract val allSettings: List<SettingProxy>

val menuPriority: Int
get() = env.getProperty("hu.bme.sch.cmsch.${component}.priority")?.toIntOrNull() ?: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<out ComponentBase>? = null,
Expand Down

0 comments on commit f9adbfd

Please sign in to comment.