public static TeacherCreditsFillingCE getValidCreditsPeriod( ExecutionSemester executionSemester, User user) { if (org.fenixedu.bennu.core.groups.Group.parse("creditsManager").isMember(user)) { return TeacherCreditsFillingForDepartmentAdmOfficeCE .getTeacherCreditsFillingForDepartmentAdmOffice(executionSemester.getAcademicInterval()); } if (RoleType.TEACHER.isMember(user)) { return TeacherCreditsFillingForTeacherCE.getTeacherCreditsFillingForTeacher( executionSemester.getAcademicInterval()); } throw new DomainException("invalid.role.type"); }
@Test public void parse() { String expr = "logged"; assertEquals(Group.parse(expr).getExpression(), expr); }