Examples of UserConfiguration


Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

                return repo.login(null, null);
            }
        });
        try {
            Root root = cs.getLatestRoot();
            UserConfiguration uc = sp.getConfiguration(UserConfiguration.class);
            UserManager umgr = uc.getUserManager(root, NamePathMapper.DEFAULT);
            Authorizable adminUser = umgr.getAuthorizable("admin");
            assertNotNull(adminUser);

            Tree adminTree = root.getTree(adminUser.getPath());
            assertTrue(adminTree.exists());
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

    protected UserManager getUserManager() {
        UserManager userManager = null;
        SecurityProvider sp = getSecurityProvider();
        Root r = getRoot();
        if (r != null && sp != null) {
            UserConfiguration uc = securityProvider.getConfiguration(UserConfiguration.class);
            userManager = uc.getUserManager(r, NamePathMapper.DEFAULT);
        }

        if (userManager == null && callbackHandler != null) {
            try {
                UserManagerCallback userCallBack = new UserManagerCallback();
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

        return acCtx;
    }

    Context getUserContext() {
        if (userCtx == null) {
            UserConfiguration uc = securityProvider.getConfiguration(UserConfiguration.class);
            userCtx = uc.getContext();
        }
        return userCtx;
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

                return repo.login(null, null);
            }
        });
        try {
            Root root = cs.getLatestRoot();
            UserConfiguration uc = sp.getConfiguration(UserConfiguration.class);
            UserManager umgr = uc.getUserManager(root, NamePathMapper.DEFAULT);
            Authorizable adminUser = umgr.getAuthorizable("admin");
            assertNotNull(adminUser);

            Tree adminTree = root.getTree(adminUser.getPath());
            assertTrue(adminTree.exists());
View Full Code Here

Examples of org.apache.jackrabbit.oak.spi.security.user.UserConfiguration

                return repo.login(null, null);
            }
        });
        try {
            Root root = cs.getLatestRoot();
            UserConfiguration uc = sp.getConfiguration(UserConfiguration.class);
            UserManager umgr = uc.getUserManager(root, NamePathMapper.DEFAULT);
            Authorizable anonymous = umgr.getAuthorizable(UserConstants.DEFAULT_ANONYMOUS_ID);
            assertNull(anonymous);
        } finally {
            cs.close();
        }
View Full Code Here

Examples of org.myphotodiary.model.UserConfiguration

    EntityManager em = ModelFactory.getEntityManager();
    EntityTransaction tx = em.getTransaction();
    // reload user from database
    try {
      user = em.find(User.class, user.getUserName());
      UserConfiguration sessionConfig = user.getConfiguration();

      if (sessionConfig == null) {
        tx.begin();
        sessionConfig = new UserConfiguration(user);
        em.persist(sessionConfig);
        getServletContext().log("No configuration data for: " + user + ". Set default configuration");
        tx.commit();
      }
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

           
            if(errors.isEmpty()) {
                request.getSession().setAttribute(Globals.USER_KEY, user);
                request.getSession().setAttribute(Globals.AUTHENTICATOR_KEY, new Authenticator(user));
                request.getSession().setAttribute(org.apache.struts.Globals.LOCALE_KEY, user.getLocale());
                request.getSession().setAttribute(Globals.CONFIGURATION_KEY, new UserConfiguration(user));
               
                MenuFactory menuFactory = (MenuFactory)request.getSession().getServletContext().getAttribute(Globals.MENU_FACTORY_KEY);
                Menu menu = menuFactory.getCustomizedMenu(AuthenticatorUtility.getAuthenticator(request));
                request.getSession().setAttribute(Globals.MENU_KEY, menu);
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

    @Override
    protected void search(PageContactForm 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;

        Sort sort = null;
        if (form.getSort() == null)
            sort = new Sort(ContactDAO.SORT_CONTACTTIMESTAMP, false);
        else
            sort = Sort.parseParam(form.getSort());

        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramSubject = form.getSubject();
        String paramBoundType = form.getBoundType();
        String paramContactType = form.getContactType();
        String paramName = form.getName();
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

    @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;

        Sort sort = ListAction.extractSort(getPanel(), "job_sort", form.getSort(), new Sort(JobListDAO.SORT_DUEDATE, true));
        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramSubject = form.getSubject();
        JobVO.Status[] paramStatus = null;
        if(form.getStatus() != null)
            paramStatus = new JobVO.Status[]{EnumUtility.valueOf(JobVO.Status.class, form.getStatus())};
View Full Code Here

Examples of org.opencustomer.util.configuration.UserConfiguration

   
    @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;

        Sort sort = extractSort(panel, form, new Sort(RoleDAO.SORT_NAME, true));

        Page page = new Page(conf.getIntValue(UserConfiguration.Key.LIST_NUMBER_ROWS), form.getPage());

        String paramName = form.getName();
        RoleDAO.AdminSelect paramAdmin = EnumUtility.valueOf(RoleDAO.AdminSelect.class, form.getAdmin(), RoleDAO.AdminSelect.ALL);
       
        RoleDAO dao = new RoleDAO();
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.