Add option in menu and new role for new project status report

FEA: ItEr77S09WBSReport
This commit is contained in:
Manuel Rego Casasnovas 2012-09-11 12:30:45 +02:00
parent 07870a7268
commit eeb61f8336
3 changed files with 10 additions and 2 deletions

View file

@ -39,6 +39,7 @@ import static org.libreplan.business.users.entities.UserRole.ROLE_PLANNING;
import static org.libreplan.business.users.entities.UserRole.ROLE_PROFILES;
import static org.libreplan.business.users.entities.UserRole.ROLE_PROGRESS_TYPES;
import static org.libreplan.business.users.entities.UserRole.ROLE_PROJECT_COSTS_REPORT;
import static org.libreplan.business.users.entities.UserRole.ROLE_PROJECT_STATUS_REPORT;
import static org.libreplan.business.users.entities.UserRole.ROLE_QUALITY_FORMS;
import static org.libreplan.business.users.entities.UserRole.ROLE_READ_ALL_PROJECTS;
import static org.libreplan.business.users.entities.UserRole.ROLE_RECEIVED_FROM_CUSTOMERS;
@ -112,7 +113,8 @@ public enum PredefinedProfiles {
ROLE_ESTIMATED_PLANNED_HOURS_PER_TASK_REPORT,
ROLE_PROJECT_COSTS_REPORT,
ROLE_TASK_SCHEDULING_STATUS_IN_PROJECT_REPORT,
ROLE_MATERIALS_NEED_AT_DATE_REPORT);
ROLE_MATERIALS_NEED_AT_DATE_REPORT,
ROLE_PROJECT_STATUS_REPORT);
private String name;
private UserRole[] roles;

View file

@ -78,7 +78,8 @@ public enum UserRole {
ROLE_ESTIMATED_PLANNED_HOURS_PER_TASK_REPORT(_("Estimated/Planned Hours Per Task Report")),
ROLE_PROJECT_COSTS_REPORT(_("Project Costs Report")),
ROLE_TASK_SCHEDULING_STATUS_IN_PROJECT_REPORT(_("Task Scheduling Status In Project Report")),
ROLE_MATERIALS_NEED_AT_DATE_REPORT(_("Materials Needs At Date Report"));
ROLE_MATERIALS_NEED_AT_DATE_REPORT(_("Materials Needs At Date Report")),
ROLE_PROJECT_STATUS_REPORT(_("Project Status Report"));
private final String displayName;

View file

@ -491,6 +491,11 @@ public class CustomMenuController extends Div implements IMenuItemsRegister {
reportsItems.add(subItem(_("Materials Needs At Date"),
"/reports/timeLineMaterialReport.zul", "15-informes.html"));
}
if (SecurityUtils
.isSuperuserOrUserInRoles(UserRole.ROLE_PROJECT_STATUS_REPORT)) {
reportsItems.add(subItem(_("Project Status"),
"/reports/projectStatusReport.zul", "15-informes.html"));
}
if (!reportsItems.isEmpty()) {
topItem(_("Reports"), "/reports/hoursWorkedPerWorkerReport.zul",
"", reportsItems);