All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tynamo.security.components.HasAnyRoles Maven / Gradle / Ivy

There is a newer version: 0.9.0
Show newest version
package org.tynamo.security.components;

import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.corelib.base.AbstractConditional;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.tynamo.security.services.SecurityService;

/**
 * @see SecurityService#hasAnyRoles(String)
 */
public class HasAnyRoles extends AbstractConditional {

	@Inject
	private SecurityService securityService;

	@Parameter(required = true, defaultPrefix="literal")
	private String roles;

	@Override
	protected boolean test() {
		return securityService.hasAnyRoles(roles);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy