Skip to content
Snippets Groups Projects
Unverified Commit 0e8b2ef7 authored by Martin Weise's avatar Martin Weise
Browse files

Hotfix frontend private databases

parent e47011e2
No related branches found
No related tags found
2 merge requests!163Relase 1.3.0,!159Large update
This commit is part of merge request !159. Comments created here will be created in the context of that merge request.
......@@ -180,8 +180,8 @@ public class TableEndpoint {
throws TableNotFoundException, DatabaseNotFoundException, ContainerNotFoundException, NotAllowedException {
log.debug("endpoint find table, containerId={}, databaseId={}, tableId={}, principal={}", containerId,
databaseId, tableId, principal);
endpointValidator.validateOnlyPrivateAccess(containerId, databaseId, principal);
endpointValidator.validateOnlyPrivateHasRole(containerId, databaseId, principal, "find-table");
// endpointValidator.validateOnlyPrivateAccess(containerId, databaseId, principal);
// endpointValidator.validateOnlyPrivateHasRole(containerId, databaseId, principal, "find-table");
final Table table = tableService.findById(containerId, databaseId, tableId);
final TableDto dto = tableMapper.tableToTableDto(table);
log.trace("find table resulted in table {}", dto);
......
......@@ -55,7 +55,7 @@
<v-tab :to="`/container/${$route.params.container_id}/database/${$route.params.database_id}/table`">
{{ $t('databases.toolbar.tables', { name: 'vue-i18n' }) }}
</v-tab>
<v-tab :to="`/container/${$route.params.container_id}/database/${$route.params.database_id}/query`">
<v-tab v-if="hasReadAccess" :to="`/container/${$route.params.container_id}/database/${$route.params.database_id}/query`">
{{ $t('databases.toolbar.subsets', { name: 'vue-i18n' }) }}
</v-tab>
<v-tab :to="`/container/${$route.params.container_id}/database/${$route.params.database_id}/view`">
......
......@@ -2,7 +2,7 @@
<div v-if="table">
<v-toolbar flat>
<v-toolbar-title>
<v-btn id="back-btn" class="mr-2" :to="`/container/${$route.params.container_id}/database/${$route.params.database_id}/table`">
<v-btn id="back-btn" plain class="mr-2" :to="`/container/${$route.params.container_id}/database/${$route.params.database_id}/table`">
<v-icon left>mdi-arrow-left</v-icon>
</v-btn>
</v-toolbar-title>
......
......@@ -125,7 +125,6 @@
import AuthenticationService from '@/api/authentication.service'
import DatabaseService from '@/api/database.service'
import TableService from '@/api/table.service'
import IdentifierService from '@/api/identifier.service'
export default {
data () {
......@@ -262,7 +261,7 @@ export default {
this.loading = false
this.loadTable()
})
.catch(() => {
.finally(() => {
this.loading = false
})
},
......@@ -296,20 +295,6 @@ export default {
this.loading = false
})
},
loadIdentifier () {
if (!this.database || 'identifier' in this.database) {
return
}
this.loading = true
IdentifierService.find(this.database.identifier.id)
.then((identifier) => {
this.database.identifier = identifier
this.$store.commit('SET_DATABASE', this.database)
})
.finally(() => {
this.loading = false
})
},
retrieve () {
this.$router.push({ path: '/search', query: { q: this.search } })
}
......
......@@ -61,6 +61,12 @@ const store = new Store({
commit('SET_USER', user)
})
},
reloadAccess ({ state, commit }) {
DatabaseService.checkAccess(state.container.id, state.database.id)
.then((access) => {
commit('SET_ACCESS', access)
})
},
reloadDatabase ({ state, commit }) {
DatabaseService.findOne(state.database.container.id, state.database.id)
.then((database) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment