Package org.fenixedu.academic.service.services.exceptions

Examples of org.fenixedu.academic.service.services.exceptions.NotAuthorizedException


        }
        if (result.equals(Integer.valueOf(-2))) {
            throw new NonValidChangeServiceException();
        }
        if (result.equals(Integer.valueOf(-3))) {
            throw new NotAuthorizedException();
        }

        final Attends userAttend = grouping.getStudentAttend(userStudent);
        if (userAttend == null) {
            throw new InvalidStudentNumberServiceException();
View Full Code Here


        IGroupEnrolmentStrategyFactory enrolmentGroupPolicyStrategyFactory = GroupEnrolmentStrategyFactory.getInstance();
        IGroupEnrolmentStrategy strategy = enrolmentGroupPolicyStrategyFactory.getGroupEnrolmentStrategyInstance(groupProperties);

        if (!strategy.checkStudentInGrouping(groupProperties, username)) {
            throw new NotAuthorizedException();
        }

        result = strategy.checkAlreadyEnroled(groupProperties, username);
        if (result) {
            throw new InvalidSituationServiceException();
View Full Code Here

        IGroupEnrolmentStrategyFactory enrolmentGroupPolicyStrategyFactory = GroupEnrolmentStrategyFactory.getInstance();
        IGroupEnrolmentStrategy strategy = enrolmentGroupPolicyStrategyFactory.getGroupEnrolmentStrategyInstance(groupProperties);

        if (!strategy.checkStudentInGrouping(groupProperties, username)) {
            throw new NotAuthorizedException();
        }

        Shift shift = FenixFramework.getDomainObject(shiftCode);
        result = strategy.checkNumberOfGroups(groupProperties, shift);
View Full Code Here

        GroupEnrolmentStrategyFactory enrolmentGroupPolicyStrategyFactory = GroupEnrolmentStrategyFactory.getInstance();
        IGroupEnrolmentStrategy strategy = enrolmentGroupPolicyStrategyFactory.getGroupEnrolmentStrategyInstance(groupProperties);

        if (!strategy.checkStudentInGrouping(groupProperties, username)) {
            throw new NotAuthorizedException();
        }

        result = strategy.checkNotEnroledInGroup(groupProperties, studentGroup, username);
        if (result) {
            throw new InvalidSituationServiceException();
View Full Code Here

        GroupEnrolmentStrategyFactory enrolmentGroupPolicyStrategyFactory = GroupEnrolmentStrategyFactory.getInstance();
        IGroupEnrolmentStrategy strategy = enrolmentGroupPolicyStrategyFactory.getGroupEnrolmentStrategyInstance(groupProperties);

        if (!strategy.checkStudentInGrouping(groupProperties, username)) {
            throw new NotAuthorizedException();
        }

        result = strategy.checkNotEnroledInGroup(groupProperties, studentGroup, username);
        if (result) {
            throw new InvalidSituationServiceException();
View Full Code Here

        GroupEnrolmentStrategyFactory enrolmentGroupPolicyStrategyFactory = GroupEnrolmentStrategyFactory.getInstance();
        IGroupEnrolmentStrategy strategy = enrolmentGroupPolicyStrategyFactory.getGroupEnrolmentStrategyInstance(groupProperties);

        if (!strategy.checkStudentInGrouping(groupProperties, username)) {
            throw new NotAuthorizedException();
        }

        result = strategy.checkNotEnroledInGroup(groupProperties, studentGroup, username);
        if (result) {
            throw new InvalidSituationServiceException();
View Full Code Here

    public void execute(String bibliographicReferenceID) throws NotAuthorizedException {
        User id = Authenticate.getUser();
        if ((id == null) || !id.getPerson().hasRole(getRoleType())
                || !bibliographicReferenceBelongsToTeacherExecutionCourse(id, bibliographicReferenceID)) {
            throw new NotAuthorizedException();
        }
    }
View Full Code Here

        User id = Authenticate.getUser();

        try {
            if ((id == null) || !id.getPerson().hasRole(getRoleType()) || !lecturesExecutionCourse(id, executionCourseID)
                    || !examBelongsExecutionCourse(id, executionCourseID, evaluationID)) {
                throw new NotAuthorizedException();
            }
        } catch (RuntimeException e) {
            throw new NotAuthorizedException();
        }

    }
View Full Code Here

            new CoordinatorExecutionDegreeAuthorizationFilter();

    public void execute(String executionDegreeId) throws NotAuthorizedException {
        User id = Authenticate.getUser();
        if ((id != null && !containsRoleType(id)) || (id != null && !hasPrivilege(id, executionDegreeId)) || (id == null)) {
            throw new NotAuthorizedException();
        }
    }
View Full Code Here

    public void execute(ExecutionCourse executionCourse) throws NotAuthorizedException {
        User id = Authenticate.getUser();

        try {
            if ((id == null) || !lecturesExecutionCourse(id, executionCourse)) {
                throw new NotAuthorizedException();
            }
        } catch (RuntimeException e) {
            throw new NotAuthorizedException();
        }
    }
View Full Code Here

TOP

Related Classes of org.fenixedu.academic.service.services.exceptions.NotAuthorizedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.