Search in sources :

Example 21 with ReportsBO

use of org.mifos.reports.business.ReportsBO in project head by mifos.

the class ActivityMapper method getReportsUserParamsSecurity.

private ActionSecurity getReportsUserParamsSecurity() {
    ReportActionSecurity security = new ReportActionSecurity("reportsUserParamsAction", "loadAddList");
    // FIXME: no associated activity exists for this constant
    security.allow("reportuserparamslist_path", SecurityConstants.ADMINISTER_REPORTPARAMS);
    for (ReportsBO report : new ReportsPersistence().getAllReports()) {
        security.allowReport(report.getReportId().intValue(), report.getActivityId());
    }
    // FIXME: no associated activity exists for this constant
    security.allow("loadAddList", SecurityConstants.ADMINISTER_REPORTPARAMS);
    security.allow("processReport", SecurityConstants.ADMINISTER_REPORTPARAMS);
    security.allow("reportsuserprocess_path", SecurityConstants.ADMINISTER_REPORTPARAMS);
    security.allow("loadAdminReport", SecurityConstants.CAN_VIEW_ADMIN_DOCUMENTS);
    return security;
}
Also used : ReportsPersistence(org.mifos.reports.persistence.ReportsPersistence) ReportsBO(org.mifos.reports.business.ReportsBO)

Aggregations

ReportsBO (org.mifos.reports.business.ReportsBO)21 ReportsPersistence (org.mifos.reports.persistence.ReportsPersistence)10 Test (org.junit.Test)9 BirtReportsUploadActionForm (org.mifos.reports.struts.actionforms.BirtReportsUploadActionForm)7 ReportsCategoryBO (org.mifos.reports.business.ReportsCategoryBO)6 ReportsJasperMap (org.mifos.reports.business.ReportsJasperMap)5 FormFile (org.apache.struts.upload.FormFile)3 MockFormFile (org.mifos.reports.business.MockFormFile)3 ActivityEntity (org.mifos.security.rolesandpermission.business.ActivityEntity)3 IOException (java.io.IOException)2 ActionErrors (org.apache.struts.action.ActionErrors)2 ActionMessage (org.apache.struts.action.ActionMessage)2 LookUpValueEntity (org.mifos.application.master.business.LookUpValueEntity)2 MifosRuntimeException (org.mifos.core.MifosRuntimeException)2 PersistenceException (org.mifos.framework.exceptions.PersistenceException)2 BufferedInputStream (java.io.BufferedInputStream)1 File (java.io.File)1 FileInputStream (java.io.FileInputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 OutputStream (java.io.OutputStream)1