Package org.apache.jackrabbit.api.security.principal

Examples of org.apache.jackrabbit.api.security.principal.ItemBasedPrincipal


            try {
                Node n = TokenBasedAuthentication.getTokenNode(tokenCredentials, session);
                final NodeImpl userNode = (NodeImpl) n.getParent().getParent();
                final String principalName = userNode.getProperty(UserImpl.P_PRINCIPAL_NAME).getString();
                if (userNode.isNodeType(UserImpl.NT_REP_USER)) {
                    Authorizable a = userManager.getAuthorizable(new ItemBasedPrincipal() {
                        public String getPath() throws RepositoryException {
                            return userNode.getPath();
                        }
                        public String getName() {
                            return principalName;
View Full Code Here


            if (!anonymousAccess && isAnonymous(principals))  {
                return CompiledPermissions.NO_PERMISSION;
            }
           
            // determined the 'user' present in the given set of principals.
            ItemBasedPrincipal userPrincipal = getUserPrincipal(principals);
            NodeImpl userNode = getUserNode(userPrincipal);
            if (userNode == null) {
                // no 'user' within set of principals -> no permissions in the
                // security workspace.
                return CompiledPermissions.NO_PERMISSION;
View Full Code Here

    private boolean denotesPrincipalPath(final String path) {
        if (path == null || path.length() == 0) {
            return false;
        }
        ItemBasedPrincipal princ = new ItemBasedPrincipal() {
            public String getPath() throws RepositoryException {
                return path;
            }
            public String getName() {
                return Text.getName(path);
View Full Code Here

        checkInitialized();
        if (isAdminOrSystem(principals)) {
            return getAdminPermissions();
        } else {
            // determined the 'user' present in the given set of principals.
            ItemBasedPrincipal userPrincipal = getUserPrincipal(principals);
            NodeImpl userNode = getUserNode(userPrincipal);
            if (userNode == null) {
                // no 'user' within set of principals -> no permissions in the
                // security workspace.
                return CompiledPermissions.NO_PERMISSION;
View Full Code Here

    static String getUserId(NodeImpl tokenNode, UserManager userManager) throws RepositoryException {
        if (tokenNode != null) {
            final NodeImpl userNode = (NodeImpl) tokenNode.getParent().getParent();
            final String principalName = userNode.getProperty(UserImpl.P_PRINCIPAL_NAME).getString();
            if (userNode.isNodeType(UserImpl.NT_REP_USER)) {
                Authorizable a = userManager.getAuthorizable(new ItemBasedPrincipal() {
                    public String getPath() throws RepositoryException {
                        return userNode.getPath();
                    }

                    public String getName() {
View Full Code Here

            try {
                Node n = TokenBasedAuthentication.getTokenNode(tokenCredentials, session);
                final NodeImpl userNode = (NodeImpl) n.getParent().getParent();
                final String principalName = userNode.getProperty(UserImpl.P_PRINCIPAL_NAME).getString();
                if (userNode.isNodeType(UserImpl.NT_REP_USER)) {
                    Authorizable a = userManager.getAuthorizable(new ItemBasedPrincipal() {
                        public String getPath() throws RepositoryException {
                            return userNode.getPath();
                        }
                        public String getName() {
                            return principalName;
View Full Code Here

    private boolean denotesPrincipalPath(final String path) {
        if (path == null || path.length() == 0) {
            return false;
        }
        ItemBasedPrincipal princ = new ItemBasedPrincipal() {
            public String getPath() throws RepositoryException {
                return path;
            }
            public String getName() {
                return Text.getName(path);
View Full Code Here

        checkInitialized();
        if (isAdminOrSystem(principals)) {
            return getAdminPermissions();
        } else {
            // determined the 'user' present in the given set of principals.
            ItemBasedPrincipal userPrincipal = getUserPrincipal(principals);
            NodeImpl userNode = getUserNode(userPrincipal);
            if (userNode == null) {
                // no 'user' within set of principals -> READ-only
                return getReadOnlyPermissions();
            } else {
View Full Code Here

            if (!anonymousAccess && isAnonymous(principals))  {
                return CompiledPermissions.NO_PERMISSION;
            }
           
            // determined the 'user' present in the given set of principals.
            ItemBasedPrincipal userPrincipal = getUserPrincipal(principals);
            NodeImpl userNode = getUserNode(userPrincipal);
            if (userNode == null) {
                // no 'user' within set of principals -> no permissions in the
                // security workspace.
                return CompiledPermissions.NO_PERMISSION;
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.api.security.principal.ItemBasedPrincipal

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.