Package org.fenixedu.bennu.core.domain

Examples of org.fenixedu.bennu.core.domain.User


    protected RoleType getRoleType() {
        return RoleType.COORDINATOR;
    }

    public void execute(String executionDegreeId) throws NotAuthorizedException {
        User id = Authenticate.getUser();
        try {
            if ((id == null) || !id.getPerson().hasRole(getRoleType()) || !isCoordinatorOfExecutionDegree(id, executionDegreeId)) {
                throw new NotAuthorizedException();
            }
        } catch (RuntimeException e) {
            throw new NotAuthorizedException();
        }
View Full Code Here


     * @return RoleType
     */
    abstract protected RoleType getRoleType();

    public void execute() throws NotAuthorizedException {
        User userView = Authenticate.getUser();
        if (((userView != null && !userView.getPerson().hasRole(getRoleType()))) || (userView == null)) {
            throw new NotAuthorizedException();
        }

    }
View Full Code Here

    }

    public void execute(Summary summary, Professorship professorshipLogged) throws NotAuthorizedException {

        try {
            User userViewLogged = Authenticate.getUser();

            boolean executionCourseResponsibleLogged = professorshipLogged.isResponsibleFor();

            if (userViewLogged == null || professorshipLogged == null) {
                throw new NotAuthorizedException("error.summary.not.authorized");
View Full Code Here

    public static final ScientificCouncilOrStudentThesisAuthorizationFilter instance =
            new ScientificCouncilOrStudentThesisAuthorizationFilter();

    @Override
    public void execute(Thesis thesis) throws NotAuthorizedException {
        final User userView = Authenticate.getUser();
        if (!userView.getPerson().hasRole(RoleType.SCIENTIFIC_COUNCIL)) {
            super.execute(thesis);
        }
    }
View Full Code Here

    private void abort() throws NotAuthorizedException {
        throw new NotAuthorizedException();
    }

    private Student getStudent() {
        User userView = Authenticate.getUser();
        return userView.getPerson().getStudent();
    }
View Full Code Here

    protected RoleType getRoleType() {
        return RoleType.COORDINATOR;
    }

    public void execute(String infoExecutionDegreeId) throws NotAuthorizedException {
        User id = Authenticate.getUser();
        try {
            if ((id == null) || !id.getPerson().hasRole(getRoleType())
                    || !isCoordinatorOfCurrentExecutionDegree(id, infoExecutionDegreeId)) {
                throw new NotAuthorizedException();
            }
        } catch (RuntimeException e) {
            throw new NotAuthorizedException();
View Full Code Here

*
*/
public class PublishedExamsMapAuthorizationFilter {

    public static void execute(Object returnedObject) {
        User userView = Authenticate.getUser();

        if (((userView != null && !userView.getPerson().hasRole(getRoleType()))) || (userView == null)) {

            if (returnedObject instanceof InfoExamsMap) {

                InfoExamsMap infoExamsMap = (InfoExamsMap) returnedObject;
                filterUnpublishedInformation(infoExamsMap);
View Full Code Here

     * @param activities
     * @return
     */
    @Atomic
    static public Process run(final Process process, final List<Pair<String, Object>> activities) {
        final User userView = Authenticate.getUser();
        for (final Pair<String, Object> activity : activities) {
            process.executeActivity(userView, activity.getKey(), activity.getValue());
        }

        return process;
View Full Code Here

     * @param activities
     * @return
     */
    @Atomic
    public static Process run(Class<? extends Process> processClass, Object object, final List<Pair<Class<?>, Object>> activities) {
        final User userView = Authenticate.getUser();
        final Process process = Process.createNewProcess(userView, processClass, object);

        for (final Pair<Class<?>, Object> activity : activities) {
            process.executeActivity(userView, activity.getKey().getSimpleName(), activity.getValue());
        }
View Full Code Here

        return new DomainObjectKeyConverter();
    }

    @Override
    public Object provide(Object source, Object currentValue) {
        final User userView = Authenticate.getUser();
        final Person supervisor = userView.getPerson();

        List<RegistrationProtocol> registrationProtocolsSet = new ArrayList<RegistrationProtocol>();
        registrationProtocolsSet.addAll(supervisor.getRegistrationProtocolsSet());
        Collections.sort(registrationProtocolsSet, RegistrationProtocol.AGREEMENT_COMPARATOR);
        return registrationProtocolsSet;
View Full Code Here

TOP

Related Classes of org.fenixedu.bennu.core.domain.User

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.