|
@@ -42,9 +42,9 @@ class MaintenanceController(
|
|
|
val userId = userRepository.getUserByUsername(SecurityContextHolder.getContext().authentication.name)
|
|
|
val valid = memberRepository.validAdmin(userId.id.toString())
|
|
|
val tableList = listOf("project", "platform", "user", "project_member", "bug", "comment")
|
|
|
- if (valid == 0) {
|
|
|
- ResponseEntity<Any>(HttpStatus.FORBIDDEN)
|
|
|
- } else {
|
|
|
+// if (valid == 0) {
|
|
|
+// ResponseEntity<Any>(HttpStatus.FORBIDDEN)
|
|
|
+// } else {
|
|
|
if (!tableList.contains(tableName) || tableName.isEmpty()) {
|
|
|
ResponseEntity<Any>(HttpStatus.BAD_REQUEST)
|
|
|
} else {
|
|
@@ -150,7 +150,7 @@ class MaintenanceController(
|
|
|
csvWriter.write(table, *nameMapping)
|
|
|
}
|
|
|
csvWriter.close()
|
|
|
- }
|
|
|
+// }
|
|
|
}
|
|
|
//todo multi / zip download?
|
|
|
}
|
|
@@ -160,9 +160,9 @@ class MaintenanceController(
|
|
|
val userId = userRepository.getUserByUsername(SecurityContextHolder.getContext().authentication.name)
|
|
|
val valid = memberRepository.validAdmin(userId.id.toString())
|
|
|
val tableList = listOf("project", "platform", "user", "project_member", "bug", "comment")
|
|
|
- if (valid == 0) {
|
|
|
- ResponseEntity<Any>(HttpStatus.FORBIDDEN)
|
|
|
- } else {
|
|
|
+// if (valid == 0) {
|
|
|
+// ResponseEntity<Any>(HttpStatus.FORBIDDEN)
|
|
|
+// } else {
|
|
|
if (!tableList.contains(tableName) || tableName.isEmpty()) {
|
|
|
ResponseEntity<Any>(HttpStatus.BAD_REQUEST)
|
|
|
} else {
|
|
@@ -279,7 +279,7 @@ class MaintenanceController(
|
|
|
else -> Unit
|
|
|
}
|
|
|
ResponseEntity<Any>(HttpStatus.OK)
|
|
|
- }
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
}
|