mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
Merge pull request #2640 from jumpserver/pr@dev@ticket
perf: ticket perm
This commit is contained in:
@@ -188,7 +188,9 @@ export default {
|
||||
hasActionPerm() {
|
||||
const approval_step = this.object.approval_step.value
|
||||
const current_user_id = this.$store.state.users.profile.id
|
||||
return this.object.process_map[approval_step - 1].assignees.indexOf(current_user_id) !== -1
|
||||
return this.object.process_map.filter(
|
||||
item => item.approval_level === approval_step
|
||||
)[0].assignees.indexOf(current_user_id) !== -1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -105,7 +105,9 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
hasActionPerm() {
|
||||
return this.object.process_map[this.object.approval_step.value - 1].assignees.indexOf(this.$store.state.users.profile.id) !== -1
|
||||
return this.object.process_map.filter(
|
||||
item => item.approval_level === this.object.approval_step.value
|
||||
)[0].assignees.indexOf(this.$store.state.users.profile.id) !== -1
|
||||
},
|
||||
isSelfTicket() {
|
||||
return this.object.applicant.id === this.$store.state.users.profile.id
|
||||
|
||||
Reference in New Issue
Block a user