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");
 }
Exemplo n.º 2
0
 @Test
 public void parse() {
   String expr = "logged";
   assertEquals(Group.parse(expr).getExpression(), expr);
 }