Search in sources :

Example 1 with SecurityService

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;
}
Also used : SecurityService(gemma.gsec.SecurityService) BioAssaySet(ubic.gemma.model.expression.experiment.BioAssaySet) ExpressionExperiment(ubic.gemma.model.expression.experiment.ExpressionExperiment)

Example 2 with SecurityService

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;
}
Also used : SecurityService(gemma.gsec.SecurityService) BioAssaySet(ubic.gemma.model.expression.experiment.BioAssaySet)

Example 3 with SecurityService

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);
}
Also used : AuditEventType(ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType) SecurityService(gemma.gsec.SecurityService)

Aggregations

SecurityService (gemma.gsec.SecurityService)3 BioAssaySet (ubic.gemma.model.expression.experiment.BioAssaySet)2 AuditEventType (ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType)1 ExpressionExperiment (ubic.gemma.model.expression.experiment.ExpressionExperiment)1