Package hudson.security

Examples of hudson.security.ACL


        protected Permission getPermission() {
            return Permission.READ;
        }

        protected ACL getACL() {
            return new ACL() {
                public boolean hasPermission(Authentication a, Permission permission) {
                     return true;
                }
            };
        }
View Full Code Here


    static {
        XSTREAM.alias("user",User.class);
    }

    public ACL getACL() {
        final ACL base = Jenkins.getInstance().getAuthorizationStrategy().getACL(this);
        // always allow a non-anonymous user full control of himself.
        return new ACL() {
            public boolean hasPermission(Authentication a, Permission permission) {
                return (a.getName().equals(id) && !(a instanceof AnonymousAuthenticationToken))
                        || base.hasPermission(a, permission);
            }
        };
    }
View Full Code Here

* @author Robert Sandell <robert.sandell@sonymobile.com>
*/
public class TestACL extends AuthorizationStrategy {
    @Override
    public ACL getRootACL() {
        return new ACL() {
            @Override
            public boolean hasPermission(Authentication a, Permission permission) {
                return true;
            }
        };
View Full Code Here

        return Collections.emptyList();
    }

    @Override
    public ACL getACL(final Job<?, ?> project) {
        return new ACL() {
            @Override
            public boolean hasPermission(Authentication a, Permission permission) {
                return a == SYSTEM || !"secure".equals(project.getName());
            }
        };
View Full Code Here

    static {
        XSTREAM.alias("user",User.class);
    }

    public ACL getACL() {
        final ACL base = Hudson.getInstance().getAuthorizationStrategy().getACL(this);
        // always allow a non-anonymous user full control of himself.
        return new ACL() {
            public boolean hasPermission(Authentication a, Permission permission) {
                return (a.getName().equals(id) && !(a instanceof AnonymousAuthenticationToken))
                        || base.hasPermission(a, permission);
            }
        };
    }
View Full Code Here

TOP

Related Classes of hudson.security.ACL

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.