Package org.apache.jackrabbit.oak.spi.security.user

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


                        next = identifierManager.getPath(PropertyValues.newWeakReference(value));

                        // filter by authorizable type, and/or get inherited members
                        if (next != null && (includeInherited || authorizableType != AuthorizableType.AUTHORIZABLE)) {
                            Tree auth = getByPath(next);
                            AuthorizableType type = UserUtil.getType(auth);

                            if (includeInherited && type == AuthorizableType.GROUP) {
                                parent = getMembers(auth, authorizableType, true, processedRefs);
                            }
                            if (authorizableType != AuthorizableType.AUTHORIZABLE && type != authorizableType) {
View Full Code Here


    @CheckForNull
    private Authorizable getAuthorizable(String resultPath) {
        Authorizable authorizable = null;
        try {
            Tree tree = root.getTree(resultPath);
            AuthorizableType type = UserUtil.getType(tree);
            while (tree.exists() && !tree.isRoot() && type == null) {
                tree = tree.getParent();
                type = UserUtil.getType(tree);
            }
            if (tree.exists() && (targetType == null || targetType == type)) {
View Full Code Here

    @Override
    public Validator childNodeAdded(String name, NodeState after) throws CommitFailedException {
        Tree tree = checkNotNull(parentAfter.getChild(name));

        AuthorizableType type = UserUtil.getType(tree);
        String authRoot = UserUtil.getAuthorizableRootPath(provider.getConfig(), type);
        if (authRoot != null) {
            assertHierarchy(tree, authRoot);
            // assert rep:principalName is present (that should actually by covered
            // by node type validator)
View Full Code Here

    }

    @Override
    public Validator childNodeDeleted(String name, NodeState before) throws CommitFailedException {
        Tree tree = parentBefore.getChild(name);
        AuthorizableType type = UserUtil.getType(tree);
        if (type == AuthorizableType.USER || type == AuthorizableType.GROUP) {
            if (isAdminUser(tree)) {
                String msg = "The admin user cannot be removed.";
                throw constraintViolation(27, msg);
            }
View Full Code Here

    @Override
    public Validator childNodeAdded(String name, NodeState after) throws CommitFailedException {
        Tree tree = checkNotNull(parentAfter.getChild(name));

        AuthorizableType type = UserUtility.getType(tree);
        String authRoot = UserUtility.getAuthorizableRootPath(provider.getConfig(), type);
        if (authRoot != null) {
            assertHierarchy(tree, authRoot);
            // assert rep:principalName is present (that should actually by covered
            // by node type validator)
View Full Code Here

    @CheckForNull
    private Authorizable getAuthorizable(String resultPath) {
        Authorizable authorizable = null;
        try {
            Tree tree = root.getTree(resultPath);
            AuthorizableType type = UserUtility.getType(tree);
            while (tree.exists() && !tree.isRoot() && type == null) {
                tree = tree.getParent();
                type = UserUtility.getType(tree);
            }
            if (tree.exists() && (targetType == null || targetType == type)) {
View Full Code Here

                        next = identifierManager.getPath(PropertyValues.newWeakReference(value));

                        // filter by authorizable type, and/or get inherited members
                        if (next != null && (includeInherited || authorizableType != AuthorizableType.AUTHORIZABLE)) {
                            Tree auth = getByPath(next);
                            AuthorizableType type = UserUtil.getType(auth);

                            if (includeInherited && type == AuthorizableType.GROUP) {
                                parent = getMembers(auth, authorizableType, true, processedRefs);
                            }
                            if (authorizableType != AuthorizableType.AUTHORIZABLE && type != authorizableType) {
View Full Code Here

    @Override
    public Validator childNodeAdded(String name, NodeState after) throws CommitFailedException {
        Tree tree = checkNotNull(parentAfter.getChild(name));

        AuthorizableType type = UserUtil.getType(tree);
        String authRoot = UserUtil.getAuthorizableRootPath(provider.getConfig(), type);
        if (authRoot != null) {
            assertHierarchy(tree, authRoot);
            // assert rep:principalName is present (that should actually by covered
            // by node type validator)
View Full Code Here

    }

    @Override
    public Validator childNodeDeleted(String name, NodeState before) throws CommitFailedException {
        Tree tree = parentBefore.getChild(name);
        AuthorizableType type = UserUtil.getType(tree);
        if (type == AuthorizableType.USER || type == AuthorizableType.GROUP) {
            if (isAdminUser(tree)) {
                String msg = "The admin user cannot be removed.";
                throw constraintViolation(27, msg);
            }
View Full Code Here

    }

    @Override
    public Validator childNodeDeleted(String name, NodeState before) throws CommitFailedException {
        Tree tree = parentBefore.getChild(name);
        AuthorizableType type = UserUtil.getType(tree);
        if (type == AuthorizableType.USER || type == AuthorizableType.GROUP) {
            if (isAdminUser(tree)) {
                String msg = "The admin user cannot be removed.";
                throw constraintViolation(27, msg);
            }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.oak.spi.security.user.AuthorizableType

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.