Package org.apache.james.mailbox.model.MailboxACL

Examples of org.apache.james.mailbox.model.MailboxACL.MailboxACLEntryKey


                HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
                no(command, tag, responder, text);
            }
            else {
               
                MailboxACLEntryKey key = new SimpleMailboxACLEntryKey(identifier);
               
                // FIXME check if identifier is a valid user or group
                // FIXME Servers, when processing a command that has an identifier as a
                // parameter (i.e., any of SETACL, DELETEACL, and LISTRIGHTS commands),
                // SHOULD first prepare the received identifier using "SASLprep" profile
View Full Code Here


                HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
                no(command, tag, responder, text);
            }
            else {
               
                MailboxACLEntryKey key = new SimpleMailboxACLEntryKey(identifier);
               
                // FIXME check if identifier is a valid user or group
                // FIXME Servers, when processing a command that has an identifier as a
                // parameter (i.e., any of SETACL, DELETEACL, and LISTRIGHTS commands),
                // SHOULD first prepare the received identifier using "SASLprep" profile
View Full Code Here

                HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
                no(command, tag, responder, text);
            }
            else {
               
                MailboxACLEntryKey key = new SimpleMailboxACLEntryKey(identifier);
               
                // FIXME check if identifier is a valid user or group
                // FIXME Servers, when processing a command that has an identifier as a
                // parameter (i.e., any of SETACL, DELETEACL, and LISTRIGHTS commands),
                // SHOULD first prepare the received identifier using "SASLprep" profile
View Full Code Here

    private static final String USER_1 = "user1";
   
    @Test
    public void testUser() throws UnsupportedRightException {
       
        MailboxACLEntryKey k = new SimpleMailboxACLEntryKey(USER_1);
        assertEquals(k.isNegative(), false);
        assertEquals(k.getNameType(), NameType.user);
        assertEquals(k.getName(), USER_1);
       
    }
View Full Code Here

    }
   
    @Test
    public void testNegativeUser() throws UnsupportedRightException {
       
        MailboxACLEntryKey k = new SimpleMailboxACLEntryKey(MailboxACL.DEFAULT_NEGATIVE_MARKER + USER_1);
        assertEquals(k.isNegative(), true);
        assertEquals(k.getNameType(), NameType.user);
        assertEquals(k.getName(), USER_1);
       
    }
View Full Code Here

   

    @Test
    public void testGroup() throws UnsupportedRightException {
       
        MailboxACLEntryKey k = new SimpleMailboxACLEntryKey(MailboxACL.DEFAULT_GROUP_MARKER + GROUP_1);
        assertEquals(k.isNegative(), false);
        assertEquals(k.getNameType(), NameType.group);
        assertEquals(k.getName(), GROUP_1);
       
    }
View Full Code Here

    }
   
    @Test
    public void testNegativeGroup() throws UnsupportedRightException {
       
        MailboxACLEntryKey k = new SimpleMailboxACLEntryKey("" + MailboxACL.DEFAULT_NEGATIVE_MARKER + MailboxACL.DEFAULT_GROUP_MARKER + GROUP_1);
        assertEquals(k.isNegative(), true);
        assertEquals(k.getNameType(), NameType.group);
        assertEquals(k.getName(), GROUP_1);
       
    }
View Full Code Here

   

    @Test
    public void testOwner() throws UnsupportedRightException {
       
        MailboxACLEntryKey k = new SimpleMailboxACLEntryKey(SpecialName.owner.toString());
        assertEquals(k.isNegative(), false);
        assertEquals(k.getNameType(), NameType.special);
        assertEquals(k.getName(), SpecialName.owner.toString());
       
    }
View Full Code Here

    }
   
    @Test
    public void testNegativeOwner() throws UnsupportedRightException {
       
        MailboxACLEntryKey k = new SimpleMailboxACLEntryKey(MailboxACL.DEFAULT_NEGATIVE_MARKER + SpecialName.owner.toString());
        assertEquals(k.isNegative(), true);
        assertEquals(k.getNameType(), NameType.special);
        assertEquals(k.getName(), SpecialName.owner.toString());
       
    }
View Full Code Here

    }

    @Test
    public void testAnybody() throws UnsupportedRightException {
       
        MailboxACLEntryKey k = new SimpleMailboxACLEntryKey(SpecialName.anybody.toString());
        assertEquals(k.isNegative(), false);
        assertEquals(k.getNameType(), NameType.special);
        assertEquals(k.getName(), SpecialName.anybody.toString());
       
    }
View Full Code Here

TOP

Related Classes of org.apache.james.mailbox.model.MailboxACL.MailboxACLEntryKey

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.