Package com.kolich.havalo.exceptions.repositories

Examples of com.kolich.havalo.exceptions.repositories.RepositoryForbiddenException


                    matcher=AntPathMatcher.class,
                    filters=HavaloAuthenticationFilter.class)
    public final KeyPair post(final KeyPair userKp) {
        // Only admin level users have the right to delete repositories.
        if(!userKp.isAdmin()) {
            throw new RepositoryForbiddenException("Authenticated " +
                "user does not have permission to create repositories: " +
                "(userId=" + userKp.getKey() + ")");
        }
        // Create a new KeyPair; this is a new user access key
        // and access secret.  NOTE: Currently key pair identities
View Full Code Here


                    filters=HavaloAuthenticationFilter.class)
    public final CuracaoEntity delete(final ObjectKey key,
                                      final KeyPair userKp) throws Exception {
        // Only admin level users have the right to delete repositories.
        if(!userKp.isAdmin()) {
            throw new RepositoryForbiddenException("Authenticated " +
                "user does not have permission to delete repositories: " +
                "(userId=" + userKp.getKey() + ", repoId=" + key + ")");
        }
        final HavaloUUID toDelete = new HavaloUUID(key.getDecodedKey());
        // Admin users cannot delete the root "admin" repository.
        if(adminUUID_.equals(toDelete)) {
            throw new RepositoryForbiddenException("Authenticated " +
                "admin user attempted to delete admin repository: " +
                toDelete.getId());
        }
        // Attempt to delete the repository, its meta data, and all
        // objects inside of it.
View Full Code Here

TOP

Related Classes of com.kolich.havalo.exceptions.repositories.RepositoryForbiddenException

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.