Examples of SyncopeUser


Examples of org.apache.syncope.core.persistence.beans.user.SyncopeUser

    public SyncopeUser getUserFromId(final Long userId) throws NotFoundException, UnauthorizedRoleException {
        if (userId == null) {
            throw new NotFoundException("Null user id");
        }

        SyncopeUser user = userDAO.find(userId);
        if (user == null) {
            throw new NotFoundException("User " + userId);
        }

        SyncopeUser authUser = userDAO.find(SecurityContextHolder.getContext().getAuthentication().getName());

        if (authUser == null || !authUser.equals(user)) {
            throw new UnauthorizedRoleException(-1L);
        }

        return user;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.