Package org.uberfire.security.authz

Examples of org.uberfire.security.authz.AuthorizationResult


                public Collection<Role> getRoles() {
                    return restriction.getRoles();
                }
            };

            final AuthorizationResult result = votingStrategy.vote(roleDecisionManager.decide(rolesResource, subject));

            if (invertResult) {
                cache.put(subject, runtimeResource, result.invert());
            } else {
                cache.put(subject, runtimeResource, result);
            }
            if (resource instanceof Cacheable) {
                ((Cacheable) resource).markAsCached();
View Full Code Here


                public Collection<Role> getRoles() {
                    return restriction.getRoles();
                }
            };

            final AuthorizationResult result = votingStrategy.vote(roleDecisionManager.decide(rolesResource, subject));

            if (invertResult) {
                cache.put(subject, runtimeResource, result.invert());
            } else {
                cache.put(subject, runtimeResource, result);
            }
            if (resource instanceof Cacheable) {
                ((Cacheable) resource).markAsCached();
View Full Code Here

        public void put(final Subject subject, final RuntimeResource resource, final AuthorizationResult authzResult) {
            if (!internal.containsKey(resource.getSignatureId())) {
                internal.put(resource.getSignatureId(), new HashMap<String, AuthorizationResult>());
            }
            final Map<String, AuthorizationResult> result = internal.get(resource.getSignatureId());
            AuthorizationResult knowValue = result.get(subject.getName());
            if (result.containsKey(subject.getName()) && knowValue.equals(authzResult)) {
                return;
            }
            result.put(subject.getName(), authzResult);
        }
View Full Code Here

            final Map<String, AuthorizationResult> result = internal.get(resource.getSignatureId());
            if (result == null) {
                return ACCESS_DENIED;
            }

            final AuthorizationResult decision = result.get(subject.getName());
            if (decision == null) {
                return ACCESS_DENIED;
            }

            return decision;
View Full Code Here

        public void put(final Subject subject, final RuntimeResource resource, final AuthorizationResult authzResult) {
            if (!internal.containsKey(resource.getSignatureId())) {
                internal.put(resource.getSignatureId(), new HashMap<String, AuthorizationResult>());
            }
            final Map<String, AuthorizationResult> result = internal.get(resource.getSignatureId());
            AuthorizationResult knowValue = result.get(subject.getName());
            if (result.containsKey(subject.getName()) && knowValue.equals(authzResult)) {
                return;
            }
            result.put(subject.getName(), authzResult);
        }
View Full Code Here

            final Map<String, AuthorizationResult> result = internal.get(resource.getSignatureId());
            if (result == null) {
                return ACCESS_DENIED;
            }

            final AuthorizationResult decision = result.get(subject.getName());
            if (decision == null) {
                return ACCESS_DENIED;
            }

            return decision;
View Full Code Here

                    }
                };
            }
        };

        final AuthorizationResult finalResult = votingStrategy.vote(results);

        if (finalResult.equals(ACCESS_ABSTAIN) || finalResult.equals(ACCESS_GRANTED)) {
            return true;
        }

        return false;
    }
View Full Code Here

            return true;
        }

        checkNotNull( "subject", subject );

        final AuthorizationResult finalResult = decisionManager.decide( resource, subject, roleDecisionManager );

        if ( finalResult.equals( ACCESS_ABSTAIN ) || finalResult.equals( ACCESS_GRANTED ) ) {
            return true;
        }

        return false;
    }
View Full Code Here

            fileSystemResource = new FileSystemResourceAdaptor( (FileSystem) resource );
        } else {
            fileSystemResource = (FileSystemResourceAdaptor) resource;
        }

        final AuthorizationResult finalResult = decisionManager.decide( fileSystemResource, subject, roleDecisionManager );

        return finalResult.equals( ACCESS_ABSTAIN ) || finalResult.equals( ACCESS_GRANTED );
    }
View Full Code Here

            fileSystemResource = new FileSystemResourceAdaptor( (FileSystem) resource );
        } else {
            fileSystemResource = (FileSystemResourceAdaptor) resource;
        }

        final AuthorizationResult finalResult = decisionManager.decide( fileSystemResource, subject, roleDecisionManager );

        return finalResult.equals( ACCESS_ABSTAIN ) || finalResult.equals( ACCESS_GRANTED );
    }
View Full Code Here

TOP

Related Classes of org.uberfire.security.authz.AuthorizationResult

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.