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 { ...@@ -141,7 +141,7 @@ export default {
}, },
actions() { actions() {
if (!this.model || !this.model.last_deployment) { if (!this.model || !this.model.last_deployment || !this.canCreateDeployment) {
return []; return [];
} }
...@@ -149,11 +149,7 @@ export default { ...@@ -149,11 +149,7 @@ export default {
this.model.last_deployment, this.model.last_deployment,
{ deep: true }, { deep: true },
); );
let combinedActions = []; const combinedActions = (manualActions || []).concat(scheduledActions || []);
if (this.canCreateDeployment) {
combinedActions = combinedActions.concat(manualActions || []);
}
combinedActions = combinedActions.concat(scheduledActions || []);
return combinedActions.map(action => ({ return combinedActions.map(action => ({
...action, ...action,
name: humanize(action.name), 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