use of gemma.gsec.SecurityService in project Gemma by PavlidisLab.
the class DifferentialExpressionAnalysisCli method doWork.
@Override
protected Exception doWork(String[] args) {
Exception err = this.processCommandLine(args);
if (err != null) {
return err;
}
SecurityService securityService = this.getBean(SecurityService.class);
for (BioAssaySet ee : expressionExperiments) {
if (!(ee instanceof ExpressionExperiment)) {
continue;
}
if (expressionExperiments.size() > 1) {
AbstractCLI.log.info(">>>>>> Begin processing: " + ee);
}
/*
* This is really only important when running as admin and in a batch mode.
*/
AbstractCLI.log.debug(securityService.getOwner(ee));
if (!securityService.isOwnedByCurrentUser(ee) && this.expressionExperiments.size() > 1) {
AbstractCLI.log.warn("Experiment is not owned by current user, skipping: " + ee);
continue;
}
this.processExperiment((ExpressionExperiment) ee);
}
this.summarizeProcessing();
return null;
}
use of gemma.gsec.SecurityService in project Gemma by PavlidisLab.
the class MakeExperimentsPublicCli method doWork.
@Override
protected Exception doWork(String[] args) {
Exception e = super.processCommandLine(args);
if (e != null)
return e;
SecurityService securityService = this.getBean(SecurityService.class);
for (BioAssaySet ee : this.expressionExperiments) {
securityService.makePublic(ee);
this.auditTrailService.addUpdateEvent(ee, MakePublicEvent.class, "Made public from command line", null);
}
return null;
}
use of gemma.gsec.SecurityService in project Gemma by PavlidisLab.
the class ArrayDesignAnnotationFileCli method audit.
private void audit(ArrayDesign arrayDesign, String note) {
SecurityService ss = this.getBean(SecurityService.class);
if (!ss.isEditable(arrayDesign))
return;
AuditEventType eventType = ArrayDesignAnnotationFileEvent.Factory.newInstance();
auditTrailService.addUpdateEvent(arrayDesign, eventType, note);
}
Aggregations