package _VisualDVM.Passes.All;
import Common.Database.Database;
import Common.Passes.DeleteObjectPass;
import _VisualDVM.Global;
import _VisualDVM.Passes.PassCode;
import _VisualDVM.Repository.BugReport.BugReport;
public class DeleteBugReport extends DeleteObjectPass<BugReport> {
    public DeleteBugReport() {
        super(BugReport.class);
    }
    @Override
    protected boolean canStart(Object... args) throws Exception {
        return super.canStart(args) && Global.mainModule.getAccount().CheckAccessRights(target.sender_address, Log);
    }
    @Override
    protected void performDone() throws Exception {
        super.performDone();
        Global.mainModule.getPass(PassCode.DeleteBugReportFromServer).Do(target);
    }
    @Override
    protected Database getDb() {
        return Global.componentsServer.db;
    }
}
