@@ -0,0 +1,665 @@
+package org.agle4j.plugin.security.tag;%0D%0A%0D%0Aimport java.util.Arrays;%0D%0A%0D%0Aimport org.apache.shiro.subject.Subject;%0D%0Aimport org.apache.shiro.web.tags.RoleTag;%0D%0A%0D%0A/**%0D%0A * %E5%88%A4%E6%96%AD%E5%BD%93%E5%89%8D%E7%94%A8%E6%88%B7%E6%98%AF%E5%90%A6%E6%8B%A5%E6%9C%89%E5%85%B6%E4%B8%AD%E6%89%80%E6%9C%89%E8%A7%92%E8%89%B2(%E9%80%97%E5%8F%B7%E5%88%86%E9%9A%94, %E8%A1%A8%E7%A4%BA %E2%80%9C%E4%B8%8E%E2%80%9D %E7%9A%84%E5%85%B3%E7%B3%BB)%0D%0A * %0D%0A * @author hanyx%0D%0A * @since 0.0.9%0D%0A */%0D%0Apublic class HasAllRolesTag extends RoleTag %7B%0D%0A%0D%0A%09private static final String ROLE_NAMES_DELIMITER = %22,%22;%0D%0A%0D%0A%09@Override%0D%0A%09protected boolean showTagBody(String roleNames) %7B%0D%0A%09%09boolean hasAllRole = false;%0D%0A%09%09Subject subject = getSubject();%0D%0A%09%09if (subject != null) %7B%0D%0A%09%09%09if (subject.hasAllRoles(Arrays.asList(roleNames.split(ROLE_NAMES_DELIMITER)))) %7B%0D%0A%09%09%09%09hasAllRole = true;%0D%0A%09%09%09%7D%0D%0A%09%09%7D%0D%0A%0D%0A%09%09return hasAllRole;%0D%0A%09%7D%0D%0A%0D%0A%7D%0D%0A

add HasAllRolesTag java