Add permission check for delayed job actions
This commit is contained in:
parent
8ab27e64fe
commit
fc0e99df9f
1 changed files with 2 additions and 6 deletions
|
@ -141,7 +141,7 @@ export default {
|
|||
},
|
||||
|
||||
actions() {
|
||||
if (!this.model || !this.model.last_deployment) {
|
||||
if (!this.model || !this.model.last_deployment || !this.canCreateDeployment) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
@ -149,11 +149,7 @@ export default {
|
|||
this.model.last_deployment,
|
||||
{ deep: true },
|
||||
);
|
||||
let combinedActions = [];
|
||||
if (this.canCreateDeployment) {
|
||||
combinedActions = combinedActions.concat(manualActions || []);
|
||||
}
|
||||
combinedActions = combinedActions.concat(scheduledActions || []);
|
||||
const combinedActions = (manualActions || []).concat(scheduledActions || []);
|
||||
return combinedActions.map(action => ({
|
||||
...action,
|
||||
name: humanize(action.name),
|
||||
|
|
Loading…
Reference in a new issue