Skip to content

Commit

Permalink
allow user to disable alert even if they dont have privileges to the …
Browse files Browse the repository at this point in the history
…underlying action
  • Loading branch information
gmmorris committed Jul 20, 2020
1 parent 46f46c7 commit a894e5a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions x-pack/plugins/alerts/server/alerts_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,6 @@ export class AlertsClient {
WriteOperations.Disable
);

if (attributes.actions.length) {
await this.actionsAuthorization.ensureAuthorized('execute');
}

if (attributes.enabled === true) {
await this.unsecuredSavedObjectsClient.update(
'alert',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,6 @@ export default function createDisableAlertTests({ getService }: FtrProviderConte
await getScheduledTask(createdAlert.scheduledTaskId);
break;
case 'space_1_all_alerts_none_actions at space1':
expect(response.statusCode).to.eql(403);
expect(response.body).to.eql({
error: 'Forbidden',
message: `Unauthorized to execute actions`,
statusCode: 403,
});
// Ensure task still exists
await getScheduledTask(createdAlert.scheduledTaskId);
break;
case 'superuser at space1':
case 'space_1_all at space1':
case 'space_1_all_with_restricted_fixture at space1':
Expand Down

0 comments on commit a894e5a

Please sign in to comment.