Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Commit 086c6af

Browse files
committed
check if permission.otherwise display all data
1 parent 7d25cf4 commit 086c6af

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

client/src/pages/user/SchemaList.vue

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -219,19 +219,36 @@
219219
this.dataConfig = []
220220
if (this.schema.hasOwnProperty('entity')) {
221221
for (let item of this.schema.entity) {
222-
if (this.schema.permission[item.name].read === true) {
223-
let isshow = true
224-
if (item.customtype) {
225-
isshow = false
222+
if (this.schema.hasOwnProperty('permission')) {
223+
if (this.schema.permission !== undefined) {
224+
if (this.schema.permission[item.name].read === true) {
225+
let isshow = true
226+
if (item.customtype) {
227+
isshow = false
228+
}
229+
this.dataConfig.push({
230+
title: item.name,
231+
key: item.name,
232+
show: isshow,
233+
sortable: false,
234+
type: item.type,
235+
width: 150
236+
})
237+
}
238+
} else {
239+
let isshow = true
240+
if (item.customtype) {
241+
isshow = false
242+
}
243+
this.dataConfig.push({
244+
title: item.name,
245+
key: item.name,
246+
show: isshow,
247+
sortable: false,
248+
type: item.type,
249+
width: 150
250+
})
226251
}
227-
this.dataConfig.push({
228-
title: item.name,
229-
key: item.name,
230-
show: isshow,
231-
sortable: false,
232-
type: item.type,
233-
width: 150
234-
})
235252
}
236253
}
237254
}

0 commit comments

Comments
 (0)