Package org.opencustomer.db.vo.system

Examples of org.opencustomer.db.vo.system.UserVO


   
    @Override
    public UserVO validate(String userName, String password, String ipAddress, Type type, ActionMessages errors) {
       
        // Suche den Benutzer f�r die Anmeldung
        UserVO user = findUser(userName);
       
        validate(type, user, password, ipAddress, errors);

        // save changes
        if (user != null && errors.size("missingRights") == && errors.size("invalidIpAddress") == 0) {
View Full Code Here


            return SignatureUtility.getInstance().isSignatureValid(user.getPassword(), clientPassword);
    }
   
    protected UserVO findUser(String userName)
    {
        UserVO user = null;
        try {
            user = new UserDAO().getByUserName(userName);
            if (user != null)
                Hibernate.initialize(user.getPerson());
        } catch (HibernateException e) {
            log.error("problems finding user user", e);
        }
        return user;
    }
View Full Code Here

     * if the user does not exists, a user creation is started.
     * @return the UserVO if the user if found or created, otherwise null.
     */
    @Override
    protected UserVO findUser(String userName) {
        UserVO user = super.findUser(userName);

        if (user == null) {
            try {
                user = LdapUtil.getInstance().createUserFromLdap(userName);
            } catch (NamingException e) {
View Full Code Here

    private static Logger log = Logger.getLogger(PageJobAction.class);

    @Override
    protected void search(PageJobForm form, ActionMessages errors, HttpServletRequest request)
    {
        UserVO user       = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        PersonVO person = (PersonVO) getPanel().getEntity();
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List list = null;
        long count = 0;
View Full Code Here

            if (panel.getEntity().getId() != null) {
                boolean writeAllowed = true;
               
                if(panel.getEntity() instanceof EntityAccess) {
                    UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
                    writeAllowed = EntityAccessUtility.isAccessGranted(user, (EntityAccess)panel.getEntity(), EntityAccess.Access.WRITE);
                   
                    if(log.isDebugEnabled())
                        log.debug("delete is allowed on entity for user: "+writeAllowed);
                }
View Full Code Here

    }
   
    @Override
    protected void search(Panel panel, ListForm form, boolean formCached, ActionMessages errors, HttpServletRequest request, HttpServletResponse response)
    {
        UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        UserConfiguration conf = (UserConfiguration)request.getSession().getAttribute(Globals.CONFIGURATION_KEY);

        List<RoleVO> list = null;
        long count = 0;
View Full Code Here

    @Override
    protected void saveEntity(EditPanel panel, ActionMessages errors, HttpServletRequest request)
    {
        RoleVO role = (RoleVO) panel.getEntity();
        UserVO user = (UserVO) request.getSession().getAttribute(Globals.USER_KEY);
       
        try
        {
            RoleDAO dao = new RoleDAO();
            if (role.getId() == null)
View Full Code Here

    }
   
    @Override
    public void createEntity(ActionMessages errors, LoadForm form, Hashtable<String, Object> attributes, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
    {
        UserVO activeUser = (UserVO) request.getSession().getAttribute(Globals.USER_KEY);

        RoleVO role = new RoleVO();
       
        role.setAccessUser(EntityAccess.Access.WRITE_SYSTEM);
        role.setOwnerUser(activeUser.getId());
        role.setAccessGroup(EntityAccess.Access.NONE);
        role.setOwnerGroup(activeUser.getProfile().getDefaultUsergroup().getId());
        role.setAccessGlobal(EntityAccess.Access.WRITE_SYSTEM);
       
        List<UserVO> users = new ArrayList<UserVO>();

        attributes.put("role", role);
View Full Code Here

public class HibernateFilter extends HibernateContextFilter
{
    @Override
    protected void processPreOperation(HttpServletRequest request)
    {
        UserVO user = (UserVO)request.getSession().getAttribute(Globals.USER_KEY);
        if(user != null) {
            setAttribute("user", user);
        }
    }
View Full Code Here

    private static Logger log = Logger.getLogger(PageStandardAction.class);

    @Override
    public void readForm(PageStandardForm form, ActionMessages errors, HttpServletRequest request)
    {
        UserVO activeUser = (UserVO) request.getSession().getAttribute(Globals.USER_KEY);
        RoleVO role       = (RoleVO)getPanel().getEntity();

        role.setName(form.getName());
        if(role.getId() == null && activeUser.getProfile().getRole().isAdmin())
            role.setAdmin(form.isAdmin());
    }
View Full Code Here

TOP

Related Classes of org.opencustomer.db.vo.system.UserVO

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.