Package org.candlepin.auth.permissions

Examples of org.candlepin.auth.permissions.PermissionFactory


     * simple Guice Module to turn our ConsumerCurator into a mock object.
     */
    private static class AuthInterceptorTestModule extends AbstractModule {
        @Override
        protected void configure() {
            PermissionFactory factory = mock(PermissionFactory.class);
            bind(PermissionFactory.class).toInstance(factory);
            ConsumerCurator mockCc = mock(ConsumerCurator.class);
            bind(ConsumerCurator.class).toInstance(mockCc);
        }
View Full Code Here


     *
     * @return full list of permissions for this user.
     */
    @XmlTransient
    public Set<Permission> getPermissions() {
        PermissionFactory permFactory = new PermissionFactory();
        Set<Permission> perms = new HashSet<Permission>();
        for (Role r : getRoles()) {
            perms.addAll(permFactory.createPermissions(this, r.getPermissions()));
        }
        perms.addAll(this.permissions);
        return perms;
    }
View Full Code Here

TOP

Related Classes of org.candlepin.auth.permissions.PermissionFactory

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.