org.tynamo.security.components.HasAnyPermissions Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tapestry-security Show documentation
Show all versions of tapestry-security Show documentation
Tynamo Security package for Tapestry 5 based on Shiro Security
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#hasAnyPermissions(String)
*/
public class HasAnyPermissions extends AbstractConditional {
@Inject
private SecurityService securityService;
@Parameter(required = true, defaultPrefix = "literal")
private String permissions;
@Override
protected boolean test() {
return securityService.hasAnyPermissions(permissions);
}
}