Commit fc0e99df authored by Winnie Hellmann's avatar Winnie Hellmann

Add permission check for delayed job actions

parent 8ab27e64
......@@ -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),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment