Package org.apache.turbine.om.security

Examples of org.apache.turbine.om.security.User


    public void testAcl1()
      throws Exception
    {
        SecurityService ss = TurbineSecurity.getService();

        User admin = ss.getUser("admin");
        assertNotNull(admin);

        AccessControlList acl = ss.getACL(admin);
        assertNotNull(acl);
View Full Code Here


    public void testAcl2()
      throws Exception
    {
        SecurityService ss = TurbineSecurity.getService();

        User admin = ss.getUser("user");
        assertNotNull(admin);

        AccessControlList acl = ss.getACL(admin);
        assertNotNull(acl);
View Full Code Here

    public void testAcl3()
      throws Exception
    {
        SecurityService ss = TurbineSecurity.getService();

        User user = ss.getUser("user");
        assertNotNull(user);

        AccessControlList acl = ss.getACL(user);
        assertNotNull(acl);
View Full Code Here

            throws DataBackendException, UnknownEntityException
    {
        for (Iterator it = getUserList(new Criteria()).iterator();
             it.hasNext();)
        {
            User user = (User) it.next();
            for (Iterator rolesIterator = getRoles(user, group).iterator();
                 rolesIterator.hasNext();)
            {
                Role role = (Role) rolesIterator.next();
                revoke(user, group, role);
View Full Code Here

     */
    public User retrieve(String userName, String password)
        throws PasswordMismatchException, UnknownEntityException,
               DataBackendException
    {
        User user = retrieve(userName);
        authenticate(user, password);
        return user;
    }
View Full Code Here

    public boolean accountExists(String username)
            throws DataBackendException
    {
        try
        {
            User ldapUser = retrieve(username);
        }
        catch (UnknownEntityException ex)
        {
            return false;
        }
View Full Code Here

     */
    public User retrieve(String username, String password)
            throws PasswordMismatchException,
            UnknownEntityException, DataBackendException
    {
        User user = retrieve(username);

        authenticate(user, password);
        return user;
    }
View Full Code Here

     * @throws UnknownEntityException if the object could not be instantiated.
     */
    public User getUserInstance()
            throws UnknownEntityException
    {
        User user;
        try
        {
            user = (User) getUserClass().newInstance();
        }
        catch (Exception e)
View Full Code Here

     * @throws UnknownEntityException if the object could not be instantiated.
     */
    public User getUserInstance(String userName)
            throws UnknownEntityException
    {
        User user = getUserInstance();
        user.setName(userName);
        return user;
    }
View Full Code Here

     *         could not be determined, or does not exist.
     */
    public User getAnonymousUser()
            throws UnknownEntityException
    {
        User user = getUserInstance();
        user.setName("");
        return user;
    }
View Full Code Here

TOP

Related Classes of org.apache.turbine.om.security.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.