Package org.apache.james

Examples of org.apache.james.AuthorizationException


        boolean[] settersRights = (boolean[]) acl.get(setter);
        if (settersRights == null
            || (settersRights[LOOKUP] == false)) {
            throw new AccessControlException(DENY_ACCESS);
        } else if (settersRights[ADMIN] == false) {
            throw new AuthorizationException(DENY_AUTH + setter);
        }
        boolean[] existingRights = (boolean[]) acl.get(identifier);
        char[] mods = modification.toCharArray();
        if (mods.length == 0) { // means delete all
            mods = DELETE_MODS;
View Full Code Here


        boolean[] gettersRights = (boolean[])  acl.get(getter);
        if (gettersRights == null
            || (gettersRights[LOOKUP] == false)) {
            throw new AccessControlException(DENY_ACCESS);
        } else if (!getter.equals(identity) && gettersRights[ADMIN] == false) {
            throw new AuthorizationException(DENY_AUTH + getter);
        }
        boolean[] rights = (boolean[]) acl.get(identity);
        if (rights == null) {
            return null;
        } else {
View Full Code Here

        boolean[] gettersRights = (boolean[]) acl.get(getter);
        if (gettersRights == null
            || (gettersRights[LOOKUP] == false)) {
            throw new AccessControlException(DENY_ACCESS);
        } else if ( gettersRights[ADMIN] == false) {
            throw new AuthorizationException(DENY_AUTH + getter);
        }
        Iterator namesIt = acl.keySet().iterator();
        StringBuffer response = new StringBuffer(20*acl.size());
        while(namesIt.hasNext()) {
            String name = (String)namesIt.next();
View Full Code Here

        boolean[] gettersRights = (boolean[]) acl.get(getter);
        if (gettersRights == null
            || (gettersRights[LOOKUP] == false)) {
            throw new AccessControlException(DENY_ACCESS);
        } else if (!getter.equals(identity) && gettersRights[ADMIN] == false) {
            throw new AuthorizationException(DENY_AUTH + getter);
        }

        return "\"\"";
    }
View Full Code Here

        boolean[] gettersRights = (boolean[]) acl.get(getter);
        if (gettersRights == null
            || (gettersRights[LOOKUP] == false)) {
            throw new AccessControlException(DENY_ACCESS);
        } else if (!getter.equals(identity) && gettersRights[ADMIN] == false) {
            throw new AuthorizationException(DENY_AUTH + getter);
        }

        return OPTIONAL_RIGHTS;
    }
View Full Code Here

        if (message == null || username == null) {
            getLogger().error("Null argument received in store.");
            throw new IllegalArgumentException("Null argument received in store.");
        }
        if (!hasInsertRights(username)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to insert.");
        }

        SimpleMessageAttributes attrs = new SimpleMessageAttributes();
        try {
            setupLogger(attrs);
View Full Code Here

     * have read rights.
     */
    public synchronized MimeMessageWrapper retrieve(int msn, String user)
        throws AccessControlException, AuthorizationException {
        if (!hasReadRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to read.");
        }

        if (msn > sequence.size()) {
            return null;
        } else {
View Full Code Here

     * have read rights.
     */
    public synchronized MimeMessageWrapper retrieveUID(int uid, String user)
        throws AccessControlException, AuthorizationException {
        if (!hasReadRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to read.");
        }
        MimeMessageWrapper response = null;
        if (sequence.contains(new Integer(uid))) {
            BufferedInputStream inMsg = null;
            try {
View Full Code Here

     * have delete rights.
     */
    public synchronized boolean markDeleted(int msn, String user)
        throws AccessControlException, AuthorizationException {
        if (!hasDeleteRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to delete.");
        }

        Assert.notImplemented();
        //TBD
        return false;
View Full Code Here

     * have delete rights.
     */
    public synchronized boolean markDeletedUID(int uid, String user)
        throws AccessControlException, AuthorizationException {
        if (!hasDeleteRights(user)) { //throws AccessControlException
            throw new AuthorizationException("Not authorized to delete.");
        }

        Assert.notImplemented();
        //TBD
        return false;
View Full Code Here

TOP

Related Classes of org.apache.james.AuthorizationException

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.