JBoss Portal SVN: r13385 - branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-05-16 17:16:01 -0400 (Sat, 16 May 2009)
New Revision: 13385
Modified:
branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java
Log:
- Added PropertyValidator to ManagedBean to allow for more flexible property validation.
Modified: branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java 2009-05-16 20:58:53 UTC (rev 13384)
+++ branches/JBoss_Portal_Branch_2_7/faces/src/main/org/jboss/portal/faces/gui/ManagedBean.java 2009-05-16 21:16:01 UTC (rev 13385)
@@ -40,6 +40,33 @@
public static final String INVALID_NAME = "INVALID_NAME_ERROR";
public static final String DUPLICATE = "DUPLICATE_ERROR";
+ public static interface PropertyValidator
+ {
+ boolean checkForDuplicates();
+
+ String getObjectTypeName();
+
+ boolean isAlreadyExisting(String propertyName);
+ }
+
+ public final PropertyValidator DEFAULT_PROPERTY_VALIDATOR = new PropertyValidator()
+ {
+ public boolean checkForDuplicates()
+ {
+ return true;
+ }
+
+ public String getObjectTypeName()
+ {
+ return ManagedBean.this.getObjectTypeName();
+ }
+
+ public boolean isAlreadyExisting(String propertyName)
+ {
+ return ManagedBean.this.isAlreadyExisting(propertyName);
+ }
+ };
+
public void setBeanContext(BeanContext beanContext)
{
this.beanContext = beanContext;
@@ -47,14 +74,17 @@
public String checkNameValidity(String name, String targetForErrorMessage)
{
- return checkNameValidity(name, targetForErrorMessage, true);
+ return checkNameValidity(name, targetForErrorMessage, DEFAULT_PROPERTY_VALIDATOR);
}
- public String checkNameValidity(String name, String targetForErrorMessage, boolean checkForDuplicates)
+ public String checkNameValidity(String name, String targetForErrorMessage, PropertyValidator validator)
{
+ ParameterValidation.throwIllegalArgExceptionIfNull(validator, "PropertyValidator");
+
+ String objectTypeName = validator.getObjectTypeName();
if (ParameterValidation.isNullOrEmpty(name))
{
- beanContext.createTargetedErrorMessage(targetForErrorMessage, INVALID_NAME, name, getLocalizedType());
+ beanContext.createTargetedErrorMessage(targetForErrorMessage, INVALID_NAME, name, getLocalizedType(objectTypeName));
return null;
}
else
@@ -64,7 +94,7 @@
// "sanitize" name: if it's invalid, return null and output message
name = ParameterValidation.sanitizeFromPatternWithHandler(name, ParameterValidation.XSS_CHECK,
- new MessageValidationHandler(null, targetForErrorMessage, name));
+ new MessageValidationHandler(null, targetForErrorMessage, name, objectTypeName));
// we got an invalid name, fail!
if (name == null)
@@ -73,9 +103,9 @@
}
// Check for duplicate
- if (checkForDuplicates && isAlreadyExisting(name))
+ if (validator.checkForDuplicates() && validator.isAlreadyExisting(name))
{
- beanContext.createTargetedErrorMessage(targetForErrorMessage, DUPLICATE, name, getLocalizedType());
+ getDuplicateErrorMessage(name, targetForErrorMessage, objectTypeName);
return null;
}
@@ -83,11 +113,21 @@
}
}
+ protected void getDuplicateErrorMessage(String name, String targetForErrorMessage, String objectTypeName)
+ {
+ beanContext.createTargetedErrorMessage(targetForErrorMessage, DUPLICATE, name, getLocalizedType(objectTypeName));
+ }
+
private String getLocalizedType()
{
- return beanContext.getMessageFromBundle(getObjectTypeName());
+ return getLocalizedType(getObjectTypeName());
}
+ private String getLocalizedType(String objectTypeName)
+ {
+ return beanContext.getMessageFromBundle(objectTypeName);
+ }
+
protected abstract String getObjectTypeName();
public abstract boolean isAlreadyExisting(String objectName);
@@ -137,17 +177,19 @@
{
private String targetForErrorMessage;
private String validatedName;
+ private String objectTypeName;
- private MessageValidationHandler(String defaultValue, String targetForErrorMessage, String validatedName)
+ private MessageValidationHandler(String defaultValue, String targetForErrorMessage, String validatedName, String objectTypeName)
{
super(defaultValue);
this.targetForErrorMessage = targetForErrorMessage;
this.validatedName = validatedName;
+ this.objectTypeName = objectTypeName;
}
protected String internalValidationErrorHandling(String s)
{
- beanContext.createTargetedErrorMessage(targetForErrorMessage, INVALID_NAME, validatedName, getLocalizedType());
+ beanContext.createTargetedErrorMessage(targetForErrorMessage, INVALID_NAME, validatedName, getLocalizedType(objectTypeName));
return null;
}
}
14 years, 12 months
JBoss Portal SVN: r13384 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/identity/cache.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-05-16 16:58:53 -0400 (Sat, 16 May 2009)
New Revision: 13384
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/identity/cache/CachedLDAPRoleModuleWrapper.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java
Log:
- Updated for changes in identity API.
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/identity/cache/CachedLDAPRoleModuleWrapper.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/identity/cache/CachedLDAPRoleModuleWrapper.java 2009-05-16 20:54:29 UTC (rev 13383)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/identity/cache/CachedLDAPRoleModuleWrapper.java 2009-05-16 20:58:53 UTC (rev 13384)
@@ -1,38 +1,39 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
package org.jboss.portal.core.identity.cache;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.RoleModule;
+import org.jboss.portal.identity.ldap.LDAPRoleImpl;
import org.jboss.portal.identity.ldap.LDAPRoleModule;
-import org.jboss.portal.identity.ldap.LDAPRoleImpl;
-import org.jboss.portal.identity.RoleModule;
-import org.jboss.portal.identity.Role;
-import org.jboss.portal.identity.IdentityException;
import javax.naming.NamingException;
import javax.naming.directory.Attributes;
+import java.util.HashSet;
+import java.util.List;
import java.util.Set;
-import java.util.List;
-import java.util.HashSet;
/**
* @author <a href="mailto:boleslaw dot dawidowicz at redhat anotherdot com">Boleslaw Dawidowicz</a>
@@ -62,6 +63,18 @@
return ldapRoleModule.findRoleByName(name);
}
+ public Role findRoleByDisplayName(String displayName) throws IdentityException, IllegalArgumentException
+ {
+ Role role = cacheService.findRoleByDisplayName(displayName);
+
+ if (role != null)
+ {
+ return role;
+ }
+
+ return ldapRoleModule.findRoleByDisplayName(displayName);
+ }
+
public Set findRolesByNames(String[] names) throws IdentityException, IllegalArgumentException
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java 2009-05-16 20:54:29 UTC (rev 13383)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/identity/cache/IdentityCacheService.java 2009-05-16 20:58:53 UTC (rev 13384)
@@ -1,24 +1,25 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
package org.jboss.portal.core.identity.cache;
@@ -46,6 +47,8 @@
protected ThreadLocal<Map<String, Role>> roleNameCache = new ThreadLocal<Map<String, Role>>();
+ protected ThreadLocal<Map<String, Role>> roleDisplayNameCache = new ThreadLocal<Map<String, Role>>();
+
protected ThreadLocal<Map<Object, Role>> roleIdCache = new ThreadLocal<Map<Object, Role>>();
@@ -55,6 +58,7 @@
userIdCache.set(null);
profileCache.set(null);
roleNameCache.set(null);
+ roleDisplayNameCache.set(null);
roleIdCache.set(null);
log.debug("Identity cache invalidated");
@@ -96,6 +100,15 @@
return roleNameCache.get();
}
+ private Map<String, Role> getRoleDisplayNameCache()
+ {
+ if (roleDisplayNameCache.get() == null)
+ {
+ roleDisplayNameCache.set(new HashMap<String, Role>());
+ }
+ return roleDisplayNameCache.get();
+ }
+
private Map<Object, Role> getRoleIdCache()
{
if (roleIdCache.get() == null)
@@ -171,10 +184,11 @@
{
getRoleIdCache().put(role.getId(), role);
getRoleNameCache().put(role.getName(), role);
+ getRoleDisplayNameCache().put(role.getDisplayName(), role);
if (log.isDebugEnabled())
{
- log.debug("Role cached for id=" + role.getId() + "; name=" + role.getName());
+ log.debug("Role cached for id=" + role.getId() + "; name=" + role.getName() + "; display name=" + role.getDisplayName());
}
}
}
@@ -186,10 +200,11 @@
{
getRoleIdCache().put(role.getId(), null);
getRoleNameCache().put(role.getName(), null);
+ getRoleDisplayNameCache().put(role.getDisplayName(), null);
if (log.isDebugEnabled())
{
- log.debug("Role invalidated in cache for id=" + role.getId() + "; name=" + role.getName());
+ log.debug("Role invalidated in cache for id=" + role.getId() + "; name=" + role.getName() + "; display name=" + role.getDisplayName());
}
}
}
@@ -242,6 +257,18 @@
return role;
}
+ public Role findRoleByDisplayName(String displayName)
+ {
+ Role role = getRoleDisplayNameCache().get(displayName);
+
+ if (role != null && log.isDebugEnabled())
+ {
+ log.debug("Role retrieved from cache for display name=" + role.getDisplayName());
+ }
+
+ return role;
+ }
+
public Role findRoleById(Object id)
{
Role role = getRoleIdCache().get(id);
14 years, 12 months
JBoss Portal SVN: r13383 - in modules/authorization/trunk: http-profile/src/test/java/org/jboss/security/authz/http/components and 11 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-05-16 16:54:29 -0400 (Sat, 16 May 2009)
New Revision: 13383
Added:
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/LocalEnforcementPoint.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/LocalPolicyProvisioner.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/PolicyProvisioner.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/ProvisioningException.java
Removed:
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/LocalEnforcementPointImpl.java
Modified:
modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java
modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestParameterMatching.java
modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestRoles.java
modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestURLPattern.java
modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/EnforcementException.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/PolicyEnforcementPoint.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/Request.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/Response.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/decision/PolicyDecisionPoint.java
modules/authorization/trunk/policy-server/src/main/resources/META-INF/jboss-beans.xml
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java
Log:
introducing the client layer to the policy server
Modified: modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java
===================================================================
--- modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -49,12 +49,12 @@
import org.jboss.security.authz.model.Policy;
+import org.jboss.security.authz.policy.client.enforcement.Request;
+import org.jboss.security.authz.policy.client.enforcement.Response;
import org.jboss.security.authz.policy.server.Server;
import org.jboss.security.authz.policy.server.PolicyServer;
import org.jboss.security.authz.policy.server.spi.PolicyConfig;
-import org.jboss.security.authz.enforcement.Request;
-import org.jboss.security.authz.enforcement.Response;
import org.jboss.security.authz.components.resource.HttpResource;
import org.jboss.security.authz.components.subject.Roles;
import org.jboss.security.authz.components.action.http.Get;
Modified: modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestParameterMatching.java
===================================================================
--- modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestParameterMatching.java 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestParameterMatching.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -27,10 +27,10 @@
import org.jboss.security.authz.components.action.Read;
import org.jboss.security.authz.components.resource.HttpResource;
import org.jboss.security.authz.components.subject.Roles;
-import org.jboss.security.authz.enforcement.Request;
-import org.jboss.security.authz.enforcement.Response;
import org.jboss.security.authz.model.Policy;
+import org.jboss.security.authz.policy.client.enforcement.Request;
+import org.jboss.security.authz.policy.client.enforcement.Response;
import org.jboss.security.authz.policy.server.PolicyServer;
import org.jboss.security.authz.policy.server.Server;
Modified: modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestRoles.java
===================================================================
--- modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestRoles.java 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestRoles.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -27,10 +27,10 @@
import org.jboss.security.authz.components.action.Read;
import org.jboss.security.authz.components.resource.HttpResource;
import org.jboss.security.authz.components.subject.Roles;
-import org.jboss.security.authz.enforcement.Request;
-import org.jboss.security.authz.enforcement.Response;
import org.jboss.security.authz.model.Policy;
+import org.jboss.security.authz.policy.client.enforcement.Request;
+import org.jboss.security.authz.policy.client.enforcement.Response;
import org.jboss.security.authz.policy.server.PolicyServer;
import org.jboss.security.authz.policy.server.Server;
Modified: modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestURLPattern.java
===================================================================
--- modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestURLPattern.java 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestURLPattern.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -28,12 +28,12 @@
import org.jboss.security.authz.components.action.Read;
import org.jboss.security.authz.components.resource.HttpResource;
import org.jboss.security.authz.components.subject.Roles;
-import org.jboss.security.authz.enforcement.Request;
-import org.jboss.security.authz.enforcement.Response;
import org.jboss.security.authz.model.Policy;
import org.jboss.security.authz.model.PolicyMetaData;
import org.jboss.security.authz.model.Resource;
+import org.jboss.security.authz.policy.client.enforcement.Request;
+import org.jboss.security.authz.policy.client.enforcement.Response;
import org.jboss.security.authz.policy.server.PolicyServer;
import org.jboss.security.authz.policy.server.Server;
Modified: modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java
===================================================================
--- modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -33,11 +33,11 @@
import org.jboss.security.authz.components.action.http.Post;
import org.jboss.security.authz.components.resource.HttpResource;
import org.jboss.security.authz.components.subject.Roles;
-import org.jboss.security.authz.enforcement.Request;
-import org.jboss.security.authz.enforcement.Response;
import org.jboss.security.authz.http.configuration.HttpPolicyConfig;
import org.jboss.security.authz.model.Policy;
import org.jboss.security.authz.tools.GeneralTool;
+import org.jboss.security.authz.policy.client.enforcement.Request;
+import org.jboss.security.authz.policy.client.enforcement.Response;
import org.jboss.security.authz.policy.server.PolicyServer;
import org.jboss.security.authz.policy.server.Server;
import org.jboss.security.authz.policy.server.spi.PolicyConfig;
Copied: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement (from rev 13381, modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement)
Modified: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/EnforcementException.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/EnforcementException.java 2009-05-16 19:32:18 UTC (rev 13381)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/EnforcementException.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -20,7 +20,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
-package org.jboss.security.authz.enforcement;
+package org.jboss.security.authz.policy.client.enforcement;
/**
* @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
Copied: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/LocalEnforcementPoint.java (from rev 13381, modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/LocalEnforcementPointImpl.java)
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/LocalEnforcementPoint.java (rev 0)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/LocalEnforcementPoint.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -0,0 +1,77 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.security.authz.policy.client.enforcement;
+
+import org.apache.log4j.Logger;
+
+import org.jboss.security.authz.policy.server.PolicyServer;
+import org.jboss.security.authz.policy.server.PolicyServerException;
+
+/**
+ * This Enforcement point integrates with the Policy Server inside the same VM. This provides the fastest enforcement option
+ *
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class LocalEnforcementPoint implements PolicyEnforcementPoint
+{
+ private static Logger log = Logger.getLogger(LocalEnforcementPoint.class);
+
+ private PolicyServer policyServer;
+
+ public LocalEnforcementPoint()
+ {
+
+ }
+
+ public void start()
+ {
+ }
+
+ public void stop()
+ {
+ }
+
+ public PolicyServer getPolicyServer()
+ {
+ return policyServer;
+ }
+
+ public void setPolicyServer(PolicyServer policyServer)
+ {
+ this.policyServer = policyServer;
+ }
+ //------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ public Response checkAccess(Request request) throws EnforcementException
+ {
+ try
+ {
+
+ return this.policyServer.evaluate(request);
+ }
+ catch(PolicyServerException pe)
+ {
+ log.error(this, pe);
+ throw new EnforcementException(pe);
+ }
+ }
+}
Deleted: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/LocalEnforcementPointImpl.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/LocalEnforcementPointImpl.java 2009-05-16 19:32:18 UTC (rev 13381)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/LocalEnforcementPointImpl.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -1,81 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.security.authz.enforcement;
-
-import org.apache.log4j.Logger;
-
-import org.jboss.security.authz.policy.server.Server;
-import org.jboss.security.authz.policy.server.PolicyServer;
-import org.jboss.security.authz.policy.server.PolicyServerException;
-
-/**
- * This component typically integrates natively with the application layer to receive Authorization Requests
- * It then processes the native request and routes it to the Policy Decision Point component of the Policy Server to get a decision whether the
- * Authorization should be granted or not or to do something else
- *
- * Sometimes, this component can just be a native stub that routes all requests over the network to the Policy Server,
- * and sometimes this component can be co-located with the Policy Server
- *
- *
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- */
-public class LocalEnforcementPointImpl implements PolicyEnforcementPoint
-{
- private static Logger log = Logger.getLogger(LocalEnforcementPointImpl.class);
-
- private PolicyServer policyServer;
-
- public LocalEnforcementPointImpl()
- {
-
- }
-
- public void start()
- {
- //Lookup the Policy Server
- this.policyServer = (PolicyServer)Server.lookup("/policy-server/PolicyServer");
-
- if(this.policyServer == null)
- {
- throw new RuntimeException("Policy Server is unavailable...");
- }
- }
-
- public void stop()
- {
- this.policyServer = null;
- }
- //------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- public Response checkAccess(Request request) throws EnforcementException
- {
- try
- {
-
- return this.policyServer.evaluate(request);
- }
- catch(PolicyServerException pe)
- {
- log.error(this, pe);
- throw new EnforcementException(pe);
- }
- }
-}
Modified: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/PolicyEnforcementPoint.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPoint.java 2009-05-16 19:32:18 UTC (rev 13381)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/PolicyEnforcementPoint.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.security.authz.enforcement;
+package org.jboss.security.authz.policy.client.enforcement;
/**
* This component typically integrates natively with the application layer to receive Authorization Requests
Modified: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/Request.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/Request.java 2009-05-16 19:32:18 UTC (rev 13381)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/Request.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.security.authz.enforcement;
+package org.jboss.security.authz.policy.client.enforcement;
import java.io.Serializable;
import java.util.Set;
Modified: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/Response.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/Response.java 2009-05-16 19:32:18 UTC (rev 13381)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/enforcement/Response.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.security.authz.enforcement;
+package org.jboss.security.authz.policy.client.enforcement;
import java.io.Serializable;
Added: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/LocalPolicyProvisioner.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/LocalPolicyProvisioner.java (rev 0)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/LocalPolicyProvisioner.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -0,0 +1,117 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.security.authz.policy.client.provisioning;
+
+import org.apache.log4j.Logger;
+
+import org.jboss.security.authz.model.Policy;
+import org.jboss.security.authz.model.PolicyMetaData;
+import org.jboss.security.authz.policy.server.PolicyServer;
+import org.jboss.security.authz.policy.server.PolicyServerException;
+
+/**
+ * This Policy Provisioner integrates with the Policy Server in the same VM. This provides fastest provisioning option
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class LocalPolicyProvisioner implements PolicyProvisioner
+{
+ private static Logger log = Logger.getLogger(LocalPolicyProvisioner.class);
+
+ private PolicyServer policyServer;
+
+ public LocalPolicyProvisioner()
+ {
+ }
+
+ public void start()
+ {
+
+ }
+
+ public void stop()
+ {
+
+ }
+
+ public PolicyServer getPolicyServer()
+ {
+ return policyServer;
+ }
+
+ public void setPolicyServer(PolicyServer policyServer)
+ {
+ this.policyServer = policyServer;
+ }
+ //--------PolicyProvisioner implementation-----------------------------------------------------------------------------------------------------------------------------------------------------------
+ public void newPolicy(PolicyMetaData policyMetaData) throws ProvisioningException
+ {
+ try
+ {
+ this.policyServer.newPolicy(policyMetaData);
+ }
+ catch(PolicyServerException pe)
+ {
+ log.error(this, pe);
+ throw new ProvisioningException(pe);
+ }
+ }
+
+ public Policy[] readAllPolicies() throws ProvisioningException
+ {
+ try
+ {
+ return this.policyServer.readAllPolicies();
+ }
+ catch(PolicyServerException pe)
+ {
+ log.error(this, pe);
+ throw new ProvisioningException(pe);
+ }
+ }
+
+ public Policy readPolicy(String policyUri) throws ProvisioningException
+ {
+ try
+ {
+ return this.policyServer.readPolicy(policyUri);
+ }
+ catch(PolicyServerException pe)
+ {
+ log.error(this, pe);
+ throw new ProvisioningException(pe);
+ }
+ }
+
+ public void deletePolicy(String policyUri) throws ProvisioningException
+ {
+ try
+ {
+ this.policyServer.deletePolicy(policyUri);
+ }
+ catch(PolicyServerException pe)
+ {
+ log.error(this, pe);
+ throw new ProvisioningException(pe);
+ }
+ }
+}
Added: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/PolicyProvisioner.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/PolicyProvisioner.java (rev 0)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/PolicyProvisioner.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -0,0 +1,60 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.security.authz.policy.client.provisioning;
+
+import org.jboss.security.authz.model.Policy;
+import org.jboss.security.authz.model.PolicyMetaData;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public interface PolicyProvisioner
+{
+ /**
+ * Generates a new Policy instance based on the supplied MetaData and stores it into the Policy Store
+ *
+ * @param policyMetaData meta data for the policy to be created
+ */
+ public void newPolicy(PolicyMetaData policyMetaData) throws ProvisioningException;
+
+ /**
+ * Read a stored Policy identified by the unique policyUri
+ *
+ * @param policyUri
+ * @return a stored Policy
+ */
+ public Policy readPolicy(String policyUri) throws ProvisioningException;
+
+ /**
+ * Returns all the stored Policies for the system
+ *
+ * @return all the stored Policies
+ */
+ public Policy[] readAllPolicies() throws ProvisioningException;
+
+ /**
+ * Deletes the specified Policy from storage
+ *
+ * @param policyUri unique identifier for the Policy
+ */
+ public void deletePolicy(String policyUri) throws ProvisioningException;
+}
Added: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/ProvisioningException.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/ProvisioningException.java (rev 0)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/client/provisioning/ProvisioningException.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.security.authz.policy.client.provisioning;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class ProvisioningException extends Exception
+{
+ public ProvisioningException()
+ {
+ super();
+ }
+
+ public ProvisioningException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public ProvisioningException(String message)
+ {
+ super(message);
+ }
+
+ public ProvisioningException(Throwable cause)
+ {
+ super(cause);
+ }
+}
Modified: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -31,14 +31,14 @@
import org.jboss.security.authz.model.PolicyException;
import org.jboss.security.authz.model.Rule;
import org.jboss.security.authz.tools.GeneralTool;
+import org.jboss.security.authz.policy.client.enforcement.Request;
+import org.jboss.security.authz.policy.client.enforcement.Response;
import org.jboss.security.authz.policy.server.decision.PolicyDecisionPoint;
import org.jboss.security.authz.policy.server.spi.PolicyStore;
import org.jboss.security.authz.policy.server.plugin.XACMLPolicy;
import org.jboss.security.authz.policy.server.plugin.EnterprisePolicyFinderModule;
import org.jboss.security.authz.policy.server.plugin.DroolsRuleManager;
-import org.jboss.security.authz.enforcement.Request;
-import org.jboss.security.authz.enforcement.Response;
import org.jboss.security.xacml.sunxacml.finder.PolicyFinderModule;
Modified: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/decision/PolicyDecisionPoint.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/decision/PolicyDecisionPoint.java 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/decision/PolicyDecisionPoint.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -31,8 +31,8 @@
import org.apache.log4j.Logger;
import org.jboss.security.authz.tools.GeneralTool;
-import org.jboss.security.authz.enforcement.Request;
-import org.jboss.security.authz.enforcement.Response;
+import org.jboss.security.authz.policy.client.enforcement.Request;
+import org.jboss.security.authz.policy.client.enforcement.Response;
import org.jboss.security.authz.policy.server.PolicyServerException;
import org.jboss.security.authz.model.Resource;
import org.jboss.security.authz.model.Attribute;
Modified: modules/authorization/trunk/policy-server/src/main/resources/META-INF/jboss-beans.xml
===================================================================
--- modules/authorization/trunk/policy-server/src/main/resources/META-INF/jboss-beans.xml 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/policy-server/src/main/resources/META-INF/jboss-beans.xml 2009-05-16 20:54:29 UTC (rev 13383)
@@ -25,5 +25,19 @@
</bean>
<bean name="/policy-server/DroolsRuleManager" class="org.jboss.security.authz.policy.server.plugin.DroolsRuleManager">
- </bean>
+ </bean>
+
+ <!-- Local Policy Enforcement client -->
+ <bean name="/enforcement/localEnforcementPoint" class="org.jboss.security.authz.policy.client.LocalEnforcementPoint">
+ <property name="policyServer">
+ <inject bean="/policy-server/PolicyServer"/>
+ </property>
+ </bean>
+
+ <!-- Local Policy Provisioning client -->
+ <bean name="/provisioning/localProvisioner" class="org.jboss.security.authz.policy.client.provisioning.LocalPolicyProvisioner">
+ <property name="policyServer">
+ <inject bean="/policy-server/PolicyServer"/>
+ </property>
+ </bean>
</deployment>
\ No newline at end of file
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -37,8 +37,8 @@
import org.jboss.security.authz.components.action.Write;
import org.jboss.security.authz.components.action.Manage;
-import org.jboss.security.authz.enforcement.Request;
-import org.jboss.security.authz.enforcement.Response;
+import org.jboss.security.authz.policy.client.enforcement.Request;
+import org.jboss.security.authz.policy.client.enforcement.Response;
import org.jboss.security.authz.policy.server.PolicyServer;
/**
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -37,8 +37,8 @@
import org.jboss.security.authz.components.action.Write;
import org.jboss.security.authz.components.action.Manage;
-import org.jboss.security.authz.enforcement.Request;
-import org.jboss.security.authz.enforcement.Response;
+import org.jboss.security.authz.policy.client.enforcement.Request;
+import org.jboss.security.authz.policy.client.enforcement.Response;
import org.jboss.security.authz.policy.server.PolicyServer;
/**
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -36,8 +36,8 @@
import org.jboss.security.authz.components.action.Write;
import org.jboss.security.authz.components.action.Manage;
-import org.jboss.security.authz.enforcement.Request;
-import org.jboss.security.authz.enforcement.Response;
+import org.jboss.security.authz.policy.client.enforcement.Request;
+import org.jboss.security.authz.policy.client.enforcement.Response;
import org.jboss.security.authz.policy.server.PolicyServer;
/**
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java 2009-05-16 20:49:29 UTC (rev 13382)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java 2009-05-16 20:54:29 UTC (rev 13383)
@@ -34,8 +34,8 @@
import org.jboss.security.authz.components.subject.Roles;
import org.jboss.security.authz.components.action.Read;
-import org.jboss.security.authz.enforcement.Request;
-import org.jboss.security.authz.enforcement.Response;
+import org.jboss.security.authz.policy.client.enforcement.Request;
+import org.jboss.security.authz.policy.client.enforcement.Response;
import org.jboss.security.authz.policy.server.PolicyServer;
import org.jboss.security.authz.policy.server.Server;
14 years, 12 months
JBoss Portal SVN: r13382 - branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-05-16 16:49:29 -0400 (Sat, 16 May 2009)
New Revision: 13382
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml
Log:
- JBPORTAL-2390: Forgot to add required on display name, doh!
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml 2009-05-16 19:32:18 UTC (rev 13381)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml 2009-05-16 20:49:29 UTC (rev 13382)
@@ -31,7 +31,7 @@
fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
<h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE_DISPLAY}"/>
- <h:inputText id="display-name" value="#{editrolemgr.uiRole.displayName}"/>
+ <h:inputText id="display-name" value="#{editrolemgr.uiRole.displayName}" required="true"/>
<h:message for="display-name" infoClass="portlet-msg-success" errorClass="portlet-msg-error"
fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
</h:panelGrid>
14 years, 12 months
JBoss Portal SVN: r13381 - in modules/authorization/trunk: http-profile and 8 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-05-16 15:32:18 -0400 (Sat, 16 May 2009)
New Revision: 13381
Added:
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/LocalEnforcementPointImpl.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/test/
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/test/pep/
modules/authorization/trunk/policy-server/src/test/resources/pdp-config.xml
Removed:
modules/authorization/trunk/enforcement/
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPointImpl.java
Modified:
modules/authorization/trunk/http-profile/pom.xml
modules/authorization/trunk/policy-server/pom.xml
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/EmbeddedBootstrap.java
modules/authorization/trunk/pom.xml
Log:
moving enforcement under policy-server component
Modified: modules/authorization/trunk/http-profile/pom.xml
===================================================================
--- modules/authorization/trunk/http-profile/pom.xml 2009-05-16 16:03:40 UTC (rev 13380)
+++ modules/authorization/trunk/http-profile/pom.xml 2009-05-16 19:32:18 UTC (rev 13381)
@@ -146,17 +146,8 @@
<overWrite>true</overWrite>
<outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
<destFileName>policy-server.jar</destFileName>
- </artifactItem>
+ </artifactItem>
<artifactItem>
- <groupId>org.jboss.security.authz</groupId>
- <artifactId>enforcement</artifactId>
- <version>${project.version}</version>
- <type>jar</type>
- <overWrite>true</overWrite>
- <outputDirectory>target/test-classes/httpprofile-testsuite.war/WEB-INF/lib</outputDirectory>
- <destFileName>enforcement.jar</destFileName>
- </artifactItem>
- <artifactItem>
<groupId>org.jboss.security</groupId>
<artifactId>jboss-xacml</artifactId>
<type>jar</type>
Modified: modules/authorization/trunk/policy-server/pom.xml
===================================================================
--- modules/authorization/trunk/policy-server/pom.xml 2009-05-16 16:03:40 UTC (rev 13380)
+++ modules/authorization/trunk/policy-server/pom.xml 2009-05-16 19:32:18 UTC (rev 13381)
@@ -23,12 +23,7 @@
<groupId>org.jboss.security.authz</groupId>
<artifactId>core-components-api</artifactId>
<version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.security.authz</groupId>
- <artifactId>enforcement</artifactId>
- <version>${project.version}</version>
- </dependency>
+ </dependency>
<!-- jboss xacml -->
<dependency>
Copied: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement (from rev 13379, modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement)
Property changes on: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/LocalEnforcementPointImpl.java (from rev 13379, modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPointImpl.java)
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/LocalEnforcementPointImpl.java (rev 0)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/LocalEnforcementPointImpl.java 2009-05-16 19:32:18 UTC (rev 13381)
@@ -0,0 +1,81 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.security.authz.enforcement;
+
+import org.apache.log4j.Logger;
+
+import org.jboss.security.authz.policy.server.Server;
+import org.jboss.security.authz.policy.server.PolicyServer;
+import org.jboss.security.authz.policy.server.PolicyServerException;
+
+/**
+ * This component typically integrates natively with the application layer to receive Authorization Requests
+ * It then processes the native request and routes it to the Policy Decision Point component of the Policy Server to get a decision whether the
+ * Authorization should be granted or not or to do something else
+ *
+ * Sometimes, this component can just be a native stub that routes all requests over the network to the Policy Server,
+ * and sometimes this component can be co-located with the Policy Server
+ *
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class LocalEnforcementPointImpl implements PolicyEnforcementPoint
+{
+ private static Logger log = Logger.getLogger(LocalEnforcementPointImpl.class);
+
+ private PolicyServer policyServer;
+
+ public LocalEnforcementPointImpl()
+ {
+
+ }
+
+ public void start()
+ {
+ //Lookup the Policy Server
+ this.policyServer = (PolicyServer)Server.lookup("/policy-server/PolicyServer");
+
+ if(this.policyServer == null)
+ {
+ throw new RuntimeException("Policy Server is unavailable...");
+ }
+ }
+
+ public void stop()
+ {
+ this.policyServer = null;
+ }
+ //------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ public Response checkAccess(Request request) throws EnforcementException
+ {
+ try
+ {
+
+ return this.policyServer.evaluate(request);
+ }
+ catch(PolicyServerException pe)
+ {
+ log.error(this, pe);
+ throw new EnforcementException(pe);
+ }
+ }
+}
Deleted: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPointImpl.java
===================================================================
--- modules/authorization/trunk/enforcement/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPointImpl.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/enforcement/PolicyEnforcementPointImpl.java 2009-05-16 19:32:18 UTC (rev 13381)
@@ -1,56 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.security.authz.enforcement;
-
-/**
- * This component typically integrates natively with the application layer to receive Authorization Requests
- * It then processes the native request and routes it to the Policy Decision Point component of the Policy Server to get a decision whether the
- * Authorization should be granted or not or to do something else
- *
- * Sometimes, this component can just be a native stub that routes all requests over the network to the Policy Server, and sometimes this component can be co-located with the Policy Server
- *
- *
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- */
-public class PolicyEnforcementPointImpl implements PolicyEnforcementPoint
-{
- public PolicyEnforcementPointImpl()
- {
-
- }
-
- public void start()
- {
-
- }
-
- public void stop()
- {
-
- }
- //------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- public Response checkAccess(Request request) throws EnforcementException
- {
- Response response = new Response();
- return response;
- }
-}
Modified: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/EmbeddedBootstrap.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/EmbeddedBootstrap.java 2009-05-16 16:03:40 UTC (rev 13380)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/EmbeddedBootstrap.java 2009-05-16 19:32:18 UTC (rev 13381)
@@ -24,6 +24,8 @@
import java.net.URL;
+import org.apache.log4j.Logger;
+
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer;
@@ -33,6 +35,8 @@
*/
final class EmbeddedBootstrap extends BasicBootstrap
{
+ private static Logger log = Logger.getLogger(EmbeddedBootstrap.class);
+
protected BasicXMLDeployer deployer;
public EmbeddedBootstrap() throws Exception
@@ -55,14 +59,14 @@
// redeployment correctly
if (deployer.getDeploymentNames().contains(url.toString()))
{
- System.out.println("Service is already deployed.");
+ log.debug("Service is already deployed.");
return;
}
deployer.deploy(url);
}
catch (Throwable t)
{
- t.printStackTrace();
+ log.error(this, t);
}
}
@@ -70,7 +74,7 @@
{
if (!deployer.getDeploymentNames().contains(url.toString()))
{
- System.out.println("Service is already undeployed.");
+ log.debug("Service is already undeployed.");
return;
}
try
@@ -79,7 +83,7 @@
}
catch (Throwable t)
{
- t.printStackTrace();
+ log.error(this, t);
}
}
@@ -87,7 +91,7 @@
{
public void run()
{
- System.out.println("Shutting down");
+ log.info("Shutting down");
deployer.shutdown();
}
}
Copied: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/test/pep (from rev 13379, modules/authorization/trunk/enforcement/src/test/java/org/jboss/security/authz/test/pep)
Property changes on: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/test/pep
___________________________________________________________________
Name: svn:mergeinfo
+
Added: modules/authorization/trunk/policy-server/src/test/resources/pdp-config.xml
===================================================================
--- modules/authorization/trunk/policy-server/src/test/resources/pdp-config.xml (rev 0)
+++ modules/authorization/trunk/policy-server/src/test/resources/pdp-config.xml 2009-05-16 19:32:18 UTC (rev 13381)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<config xmlns="http://sunxacml.sourceforge.net/schema/config-0.3"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ defaultPDP="pdp" defaultAttributeFactory="attr"
+ defaultCombiningAlgFactory="comb" defaultFunctionFactory="func">
+
+ <pdp name="pdp">
+ <attributeFinderModule class="org.jboss.security.xacml.sunxacml.finder.impl.CurrentEnvModule"/>
+ <attributeFinderModule class="org.jboss.security.xacml.sunxacml.finder.impl.SelectorModule"/>
+ <policyFinderModule class="org.jboss.security.xacml.sunxacml.finder.impl.FilePolicyModule">
+ <list>
+ <string>simple-policy.xml</string>
+ </list>
+ </policyFinderModule>
+ </pdp>
+
+ <attributeFactory name="attr" useStandardDatatypes="true"/>
+
+ <combiningAlgFactory name="comb" useStandardAlgorithms="true">
+ <algorithm class="org.jboss.security.authz.test.pep.NoPermitMeansDeniedAlg"/>
+ <algorithm class="org.jboss.security.authz.test.pep.RuleCombiningAlgImplies"/>
+ </combiningAlgFactory>
+
+ <functionFactory name="func" useStandardFunctions="true"/>
+</config>
Modified: modules/authorization/trunk/pom.xml
===================================================================
--- modules/authorization/trunk/pom.xml 2009-05-16 16:03:40 UTC (rev 13380)
+++ modules/authorization/trunk/pom.xml 2009-05-16 19:32:18 UTC (rev 13381)
@@ -12,7 +12,6 @@
<modules>
<module>common-api</module>
<module>core-components-api</module>
- <module>enforcement</module>
<module>policy-server</module>
<module>http-profile</module>
</modules>
14 years, 12 months
JBoss Portal SVN: r13380 - in modules/authorization/trunk: core-components-api/src/test/java/org/jboss/security/authz/components/http and 11 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-05-16 12:03:40 -0400 (Sat, 16 May 2009)
New Revision: 13380
Added:
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/XACMLPolicy.java
Removed:
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/HierarchialPolicy.java
Modified:
modules/authorization/trunk/common-api/src/main/java/org/jboss/security/authz/model/Policy.java
modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/components/http/TestHttpResource.java
modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/components/subject/TestIdentity.java
modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/test/MockPolicy.java
modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/configuration/HttpPolicyConfig.java
modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java
modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestParameterMatching.java
modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestRoles.java
modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestURLPattern.java
modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/decision/PolicyDecisionPoint.java
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/EnterprisePolicyFinderModule.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestPolicyServer.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java
Log:
refactoring
Modified: modules/authorization/trunk/common-api/src/main/java/org/jboss/security/authz/model/Policy.java
===================================================================
--- modules/authorization/trunk/common-api/src/main/java/org/jboss/security/authz/model/Policy.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/common-api/src/main/java/org/jboss/security/authz/model/Policy.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -88,5 +88,5 @@
*
* @return XACML markup to represent this Policy
*/
- public abstract String generateXACMLPolicy() throws PolicyException;
+ public abstract String generateSystemPolicy() throws PolicyException;
}
Modified: modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/components/http/TestHttpResource.java
===================================================================
--- modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/components/http/TestHttpResource.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/components/http/TestHttpResource.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -47,7 +47,7 @@
Policy policy = new MockPolicy("testGetURLTargetNoParameters", httpResource.getPolicyMetaData());
log.info("------------------------------------------------------------------");
- log.info(policy.generateXACMLPolicy());
+ log.info(policy.generateSystemPolicy());
}
public void testGetURLTargetWithParameters() throws Exception
@@ -61,7 +61,7 @@
Policy policy = new MockPolicy("testGetURLTargetWithParameters", httpResource.getPolicyMetaData());
log.info("------------------------------------------------------------------");
- log.info(policy.generateXACMLPolicy());
+ log.info(policy.generateSystemPolicy());
}
public void testRoleRules() throws Exception
@@ -76,7 +76,7 @@
Policy policy = new MockPolicy("testRoleRules", httpResource.getPolicyMetaData());
log.info("------------------------------------------------------------------");
- log.info(policy.generateXACMLPolicy());
+ log.info(policy.generateSystemPolicy());
}
public void testIPRules() throws Exception
@@ -91,7 +91,7 @@
Policy policy = new MockPolicy("testIPRules", httpResource.getPolicyMetaData());
log.info("------------------------------------------------------------------");
- log.info(policy.generateXACMLPolicy());
+ log.info(policy.generateSystemPolicy());
}
public void testURLPattern() throws Exception
@@ -106,6 +106,6 @@
Policy policy = new MockPolicy("testURLPattern", httpResource.getPolicyMetaData());
log.info("------------------------------------------------------------------");
- log.info(policy.generateXACMLPolicy());
+ log.info(policy.generateSystemPolicy());
}
}
Modified: modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/components/subject/TestIdentity.java
===================================================================
--- modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/components/subject/TestIdentity.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/components/subject/TestIdentity.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -58,7 +58,7 @@
Policy policy = new MockPolicy("testGetAllowIdentityRule", metadata);
log.info("----------------------------------------------------------------");
- log.info(policy.generateXACMLPolicy());
+ log.info(policy.generateSystemPolicy());
}
public void testDeny() throws Exception
@@ -78,7 +78,7 @@
Policy policy = new MockPolicy("testGetDenyIdentityRule", metadata);
log.info("----------------------------------------------------------------");
- log.info(policy.generateXACMLPolicy());
+ log.info(policy.generateSystemPolicy());
}
public void testGetSubject() throws Exception
Modified: modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/test/MockPolicy.java
===================================================================
--- modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/test/MockPolicy.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/core-components-api/src/test/java/org/jboss/security/authz/test/MockPolicy.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -80,7 +80,7 @@
@Override
- public String generateXACMLPolicy() throws PolicyException
+ public String generateSystemPolicy() throws PolicyException
{
ByteArrayOutputStream bos = null;
try
Modified: modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/configuration/HttpPolicyConfig.java
===================================================================
--- modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/configuration/HttpPolicyConfig.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/configuration/HttpPolicyConfig.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -41,7 +41,7 @@
import org.jboss.security.authz.components.resource.HttpResource;
import org.jboss.security.authz.model.Policy;
import org.jboss.security.authz.tools.GeneralTool;
-import org.jboss.security.authz.policy.server.plugin.HierarchialPolicy;
+import org.jboss.security.authz.policy.server.plugin.XACMLPolicy;
import org.jboss.security.authz.policy.server.spi.PolicyConfig;
import org.jboss.security.authz.components.action.http.Get;
@@ -95,7 +95,7 @@
//Parse role constraints
this.parseRoles(policyResource, securityConstraint.getElementsByTagName("roles"));
- cour.add(new HierarchialPolicy(GeneralTool.generateUniqueId(), policyResource.getPolicyMetaData()));
+ cour.add(new XACMLPolicy(GeneralTool.generateUniqueId(), policyResource.getPolicyMetaData()));
}
}
}
Modified: modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java
===================================================================
--- modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/http-profile/src/main/java/org/jboss/security/authz/http/enforcement/SecurityFilter.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -106,7 +106,7 @@
log.debug("----------------------------------------------------------");
for(Policy policy: policies)
{
- log.debug(policy.generateXACMLPolicy());
+ log.debug(policy.generateSystemPolicy());
this.policyServer.newPolicy(policy.getMetaData());
}
log.debug("----------------------------------------------------------");
Modified: modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestParameterMatching.java
===================================================================
--- modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestParameterMatching.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestParameterMatching.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -68,7 +68,7 @@
assertTrue("Policy Store must not be empty!!", (policies != null && policies.length == 1));
log.info("------------------------------------------------------------------------------");
- log.info(policies[0].generateXACMLPolicy());
+ log.info(policies[0].generateSystemPolicy());
//SetUp a Contextual HttpResource component representing an incoming request that needs authorization
//where access should be granted
@@ -120,7 +120,7 @@
assertTrue("Policy Store must not be empty!!", (policies != null && policies.length == 1));
log.info("------------------------------------------------------------------------------");
- log.info(policies[0].generateXACMLPolicy());
+ log.info(policies[0].generateSystemPolicy());
//SetUp a Contextual HttpResource component representing an incoming request that needs authorization
//where access should not be granted
Modified: modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestRoles.java
===================================================================
--- modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestRoles.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestRoles.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -66,7 +66,7 @@
assertTrue("Policy Store must not be empty!!", (policies != null && policies.length == 1));
log.info("------------------------------------------------------------------------------");
- log.info(policies[0].generateXACMLPolicy());
+ log.info(policies[0].generateSystemPolicy());
HttpResource incoming = new HttpResource();
incoming.setUri(new URI("/private/devspace/wiki.html"));
@@ -94,7 +94,7 @@
assertTrue("Policy Store must not be empty!!", (policies != null && policies.length == 1));
log.info("------------------------------------------------------------------------------");
- log.info(policies[0].generateXACMLPolicy());
+ log.info(policies[0].generateSystemPolicy());
HttpResource incoming = new HttpResource();
incoming.setUri(new URI("/private/devspace/wiki.html"));
Modified: modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestURLPattern.java
===================================================================
--- modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestURLPattern.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/components/TestURLPattern.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -89,7 +89,7 @@
assertTrue("Policy Store must not be empty!!", (policies != null && policies.length == 1));
log.info("------------------------------------------------------------------------------");
- log.info(policies[0].generateXACMLPolicy());
+ log.info(policies[0].generateSystemPolicy());
//Access Granted
this.enforce(this.createRequest("/prefix/url"), true);
Modified: modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java
===================================================================
--- modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -75,7 +75,7 @@
for(int i=0; i<policies.length; i++)
{
- String xacmlPolicy = policies[i].generateXACMLPolicy();
+ String xacmlPolicy = policies[i].generateSystemPolicy();
this.policyServer.newPolicy(policies[i].getMetaData());
log.info("------------------------------------------------------");
Modified: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -33,7 +33,7 @@
import org.jboss.security.authz.tools.GeneralTool;
import org.jboss.security.authz.policy.server.decision.PolicyDecisionPoint;
import org.jboss.security.authz.policy.server.spi.PolicyStore;
-import org.jboss.security.authz.policy.server.plugin.HierarchialPolicy;
+import org.jboss.security.authz.policy.server.plugin.XACMLPolicy;
import org.jboss.security.authz.policy.server.plugin.EnterprisePolicyFinderModule;
import org.jboss.security.authz.policy.server.plugin.DroolsRuleManager;
@@ -151,7 +151,7 @@
{
try
{
- Policy policy = new HierarchialPolicy(GeneralTool.generateUniqueId(), policyMetaData);
+ Policy policy = new XACMLPolicy(GeneralTool.generateUniqueId(), policyMetaData);
//Save the policy in the Policy Store
this.policyStore.savePolicy(policy);
Modified: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/decision/PolicyDecisionPoint.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/decision/PolicyDecisionPoint.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/decision/PolicyDecisionPoint.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -64,6 +64,7 @@
private PDP policyDecisionPoint;
private ConfigurationStore store;
+ private boolean debug;
public PolicyDecisionPoint()
{
@@ -129,6 +130,17 @@
this.policyDecisionPoint = null;
this.store = null;
}
+
+
+ public boolean isDebug()
+ {
+ return debug;
+ }
+
+ public void setDebug(boolean debug)
+ {
+ this.debug = debug;
+ }
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/**
* Makes an Authorization Decision
@@ -250,8 +262,11 @@
//Check for explicit access control
RequestContext requestContext = RequestResponseContextFactory.createRequestCtx();
- requestContext.setRequest(xacmlRequest);
- requestContext.marshall(System.out);
+ requestContext.setRequest(xacmlRequest);
+ if(this.debug)
+ {
+ requestContext.marshall(System.out);
+ }
RequestCtx xacmlRequestCtx = (RequestCtx)requestContext.get(XACMLConstants.REQUEST_CTX);
ResponseCtx xacmlResponseCtx = this.policyDecisionPoint.evaluate(xacmlRequestCtx);
@@ -259,7 +274,10 @@
ResponseContext responseContext = RequestResponseContextFactory.createResponseContext();
responseContext.set(XACMLConstants.RESPONSE_CTX, xacmlResponseCtx);
- responseContext.marshall(System.out);
+ if(this.debug)
+ {
+ responseContext.marshall(System.out);
+ }
if(responseContext.getDecision() == XACMLConstants.DECISION_PERMIT)
{
Modified: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/EnterprisePolicyFinderModule.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/EnterprisePolicyFinderModule.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/EnterprisePolicyFinderModule.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -69,7 +69,7 @@
ByteArrayInputStream bos = null;
try
{
- String xacmlPolicyStr = policy.generateXACMLPolicy();
+ String xacmlPolicyStr = policy.generateSystemPolicy();
bos = new ByteArrayInputStream(xacmlPolicyStr.getBytes());
Deleted: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/HierarchialPolicy.java
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/HierarchialPolicy.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/HierarchialPolicy.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -1,291 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.security.authz.policy.server.plugin;
-
-import java.util.List;
-import java.util.Set;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-import javax.xml.bind.JAXBElement;
-
-import org.jboss.security.authz.xacml.AttributeDesignatorUtil;
-import org.jboss.security.authz.xacml.PolicyUtil;
-import org.jboss.security.authz.model.AttributeExpression;
-import org.jboss.security.authz.model.DroolsRuleExpression;
-import org.jboss.security.authz.model.Effect;
-import org.jboss.security.authz.model.Expression;
-import org.jboss.security.authz.model.Policy;
-import org.jboss.security.authz.model.PolicyException;
-import org.jboss.security.authz.model.Rule;
-import org.jboss.security.authz.model.PolicyMetaData;
-
-import org.jboss.security.xacml.core.model.policy.ActionMatchType;
-import org.jboss.security.xacml.core.model.policy.SubjectMatchType;
-import org.jboss.security.xacml.core.model.policy.ApplyType;
-import org.jboss.security.xacml.core.model.policy.VariableReferenceType;
-import org.jboss.security.xacml.core.model.policy.EffectType;
-import org.jboss.security.xacml.core.model.policy.PolicyType;
-import org.jboss.security.xacml.core.model.policy.ResourceMatchType;
-import org.jboss.security.xacml.core.model.policy.ResourcesType;
-import org.jboss.security.xacml.core.model.policy.ResourceType;
-import org.jboss.security.xacml.core.model.policy.ActionsType;
-import org.jboss.security.xacml.core.model.policy.ActionType;
-import org.jboss.security.xacml.core.model.policy.SubjectsType;
-import org.jboss.security.xacml.core.model.policy.SubjectType;
-import org.jboss.security.xacml.core.model.policy.RuleType;
-import org.jboss.security.xacml.core.model.policy.TargetType;
-import org.jboss.security.xacml.core.model.policy.ConditionType;
-import org.jboss.security.xacml.core.model.policy.ObjectFactory;
-import org.jboss.security.xacml.core.model.policy.AttributeValueType;
-import org.jboss.security.xacml.core.model.policy.SubjectAttributeDesignatorType;
-import org.jboss.security.xacml.factories.PolicyAttributeFactory;
-
-/**
- * TODO: Implement Hierarchial propagation feature.....such as Policy Inheritance, Policy Overriding
- *
- * Usecases: A resource /blah/blah2/index, should inherit Overriden Policy from /blah/blah2 (if found), or from /blah (if found)
- * /blah/blah2/index can also explicitly specify its own Policy which will override any inherited policies from its parent
- */
-
-/**
- * Used for specifying policies for Resources represented by unique URIs, sometimes forming a tree like relationship with other Resources in the system
- *
- * An example of such resources would be tree of resources/nodes in a Content Management System
- *
- * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
- *
- */
-public class HierarchialPolicy extends Policy
-{
- public HierarchialPolicy(String policyUri, PolicyMetaData metaData) throws PolicyException
- {
- super(policyUri, metaData);
- }
-
-
- @Override
- public String generateXACMLPolicy() throws PolicyException
- {
- ByteArrayOutputStream bos = null;
- try
- {
- String xacmlXml = null;
-
- //SetUp the Policy Header
- ObjectFactory objectFactory = new ObjectFactory();
- PolicyType policyType = new PolicyType();
- policyType.setPolicyId(this.policyUri);
- policyType.setVersion("2.0");
- policyType.setRuleCombiningAlgId(new NoPermitMeansDeniedAlg().getIdentifier().toString());
-
- TargetType targetType = new TargetType();
- policyType.setTarget(targetType);
-
- //Process Resource Matches as Targets for the Policy
- List<AttributeExpression> resourceMatches = this.metaData.getTarget().getResourceMatches();
- if(resourceMatches != null && !resourceMatches.isEmpty())
- {
- ResourcesType resourcesType = new ResourcesType();
- targetType.setResources(resourcesType);
- ResourceType resourceType = new ResourceType();
-
- for(AttributeExpression resourceMatch: resourceMatches)
- {
- ResourceMatchType rmt = new ResourceMatchType();
-
- rmt.setMatchId(resourceMatch.getFunctionId());
-
- rmt.setResourceAttributeDesignator(AttributeDesignatorUtil.getAttributeDesignator(resourceMatch.getAttribute(), resourceMatch.
- designatorMustBePresent()));
-
- rmt.setAttributeValue(PolicyAttributeFactory
- .createStringAttributeType(resourceMatch.getAttribute().getValue()));
-
- resourceType.getResourceMatch().add(rmt);
- }
-
- resourcesType.getResource().add(resourceType);
- }
-
- //Process Action Matches as Targets for the Policy
- List<AttributeExpression> targetActionMatches = this.metaData.getTarget().getActionMatches();
- if(targetActionMatches != null && !targetActionMatches.isEmpty())
- {
- ActionsType actionsType = this.generateRuleActions(targetActionMatches);
- targetType.setActions(actionsType);
- }
-
-
- //Process the Policy Rules
- Set<Rule> rules = this.metaData.getRules();
- if(rules != null && !rules.isEmpty())
- {
- for(Rule rule: rules)
- {
- RuleType ruleType = new RuleType();
- ruleType.setRuleId(rule.getRuleId());
- if(rule.getEffect() == Effect.PERMIT)
- {
- ruleType.setEffect(EffectType.PERMIT);
- }
- else
- {
- ruleType.setEffect(EffectType.DENY);
- }
-
- //Process the Rule Target
- if(rule.getTarget() != null)
- {
- List<AttributeExpression> actionMatches = rule.getTarget().getActionMatches();
- List<AttributeExpression> subjectMatches = rule.getTarget().getSubjectMatches();
- TargetType ruleTarget = new TargetType();
-
- if(actionMatches != null && !actionMatches.isEmpty())
- {
- ruleTarget.setActions(this.generateRuleActions(actionMatches));
- }
-
- if(subjectMatches != null && !subjectMatches.isEmpty())
- {
- ruleTarget.setSubjects(this.generateRuleSubjects(subjectMatches));
- }
-
- ruleType.setTarget(ruleTarget);
- }
-
- //Process the Rule Expression/Condition
- if(rule.getExpression() != null)
- {
- ConditionType condition = this.generateCondition(objectFactory, rule.getExpression());
- ruleType.setCondition(condition);
- }
-
- policyType.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().add(ruleType);
- }
- }
-
- bos = new ByteArrayOutputStream();
- PolicyUtil.marshall(bos, policyType);
- xacmlXml = new String(bos.toByteArray());
-
- return xacmlXml;
- }
- catch(Exception e)
- {
- throw new PolicyException(e);
- }
- finally
- {
- if(bos != null)
- {
- try{bos.close();}catch(IOException ioe){}
- }
- }
- }
-
- private ActionsType generateRuleActions(List<AttributeExpression> actionMatches)
- {
- ActionsType actions = new ActionsType();
-
- for(AttributeExpression action: actionMatches)
- {
- ActionType actionType = new ActionType();
- ActionMatchType amct = new ActionMatchType();
- amct.setMatchId(action.getFunctionId());
- amct.setAttributeValue(PolicyAttributeFactory.createStringAttributeType(action.getAttribute().getValue()));
- amct.setActionAttributeDesignator(AttributeDesignatorUtil.getAttributeDesignator(action.getAttribute(), true));
- actionType.getActionMatch().add(amct);
- actions.getAction().add(actionType);
- }
-
- return actions;
- }
-
- private SubjectsType generateRuleSubjects(List<AttributeExpression> subjectMatches)
- {
- SubjectsType subjects = new SubjectsType();
-
- for(AttributeExpression subject: subjectMatches)
- {
- SubjectType subjectType = new SubjectType();
- SubjectMatchType match = new SubjectMatchType();
- match.setMatchId(subject.getFunctionId());
- match.setAttributeValue(PolicyAttributeFactory.createStringAttributeType(subject.getAttribute().getValue()));
- match.setSubjectAttributeDesignator((SubjectAttributeDesignatorType)AttributeDesignatorUtil.getAttributeDesignator(subject.getAttribute(), true));
- subjectType.getSubjectMatch().add(match);
- subjects.getSubject().add(subjectType);
- }
-
- return subjects;
- }
-
- /**
- *
- * @param expression
- * @return
- */
- private ConditionType generateCondition(ObjectFactory objectFactory, Expression expression)
- {
- ConditionType condition = new ConditionType();
-
- if(expression instanceof AttributeExpression)
- {
- AttributeExpression attributeExpression = (AttributeExpression)expression;
-
- //Function to be applied
- ApplyType apply = new ApplyType();
- apply.setFunctionId(attributeExpression.getFunctionId());
-
- //Value to check against
- AttributeValueType attrValue = PolicyAttributeFactory.createStringAttributeType(attributeExpression.getAttribute().getValue());
- JAXBElement<AttributeValueType> jaxbAttrValue = objectFactory.createAttributeValue(attrValue);
- apply.getExpression().add(jaxbAttrValue);
-
- //Place within the Context where this Value should exist during an Authorization Request
- apply.getExpression().add(AttributeDesignatorUtil.getAttributeDesignatorXml(attributeExpression.getAttribute(), true));
-
-
- condition.setExpression(objectFactory.createApply(apply));
- }
- else if(expression instanceof DroolsRuleExpression)
- {
- DroolsRuleExpression ruleExpression = (DroolsRuleExpression)expression;
-
- //Function to be applied
- ApplyType apply = new ApplyType();
- apply.setFunctionId(ruleExpression.getFunctionId());
-
-
- VariableReferenceType ruleReference = new VariableReferenceType();
- ruleReference.setVariableId(ruleExpression.getRuleReference());
- JAXBElement<VariableReferenceType> jaxbRuleReference = objectFactory.createVariableReference(ruleReference);
- apply.getExpression().add(jaxbRuleReference);
-
-
- condition.setExpression(objectFactory.createApply(apply));
- }
-
- return condition;
- }
-}
Copied: modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/XACMLPolicy.java (from rev 13379, modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/HierarchialPolicy.java)
===================================================================
--- modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/XACMLPolicy.java (rev 0)
+++ modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/plugin/XACMLPolicy.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -0,0 +1,285 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.security.authz.policy.server.plugin;
+
+import java.util.List;
+import java.util.Set;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
+import javax.xml.bind.JAXBElement;
+
+import org.jboss.security.authz.xacml.AttributeDesignatorUtil;
+import org.jboss.security.authz.xacml.PolicyUtil;
+import org.jboss.security.authz.model.AttributeExpression;
+import org.jboss.security.authz.model.DroolsRuleExpression;
+import org.jboss.security.authz.model.Effect;
+import org.jboss.security.authz.model.Expression;
+import org.jboss.security.authz.model.Policy;
+import org.jboss.security.authz.model.PolicyException;
+import org.jboss.security.authz.model.Rule;
+import org.jboss.security.authz.model.PolicyMetaData;
+
+import org.jboss.security.xacml.core.model.policy.ActionMatchType;
+import org.jboss.security.xacml.core.model.policy.SubjectMatchType;
+import org.jboss.security.xacml.core.model.policy.ApplyType;
+import org.jboss.security.xacml.core.model.policy.VariableReferenceType;
+import org.jboss.security.xacml.core.model.policy.EffectType;
+import org.jboss.security.xacml.core.model.policy.PolicyType;
+import org.jboss.security.xacml.core.model.policy.ResourceMatchType;
+import org.jboss.security.xacml.core.model.policy.ResourcesType;
+import org.jboss.security.xacml.core.model.policy.ResourceType;
+import org.jboss.security.xacml.core.model.policy.ActionsType;
+import org.jboss.security.xacml.core.model.policy.ActionType;
+import org.jboss.security.xacml.core.model.policy.SubjectsType;
+import org.jboss.security.xacml.core.model.policy.SubjectType;
+import org.jboss.security.xacml.core.model.policy.RuleType;
+import org.jboss.security.xacml.core.model.policy.TargetType;
+import org.jboss.security.xacml.core.model.policy.ConditionType;
+import org.jboss.security.xacml.core.model.policy.ObjectFactory;
+import org.jboss.security.xacml.core.model.policy.AttributeValueType;
+import org.jboss.security.xacml.core.model.policy.SubjectAttributeDesignatorType;
+import org.jboss.security.xacml.factories.PolicyAttributeFactory;
+
+
+/**
+ * Used for mapping the Policy domain model to the system level Policy representation. This particular instance maps the Policy domain model to
+ * XACML representation
+ *
+ *
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ *
+ */
+public class XACMLPolicy extends Policy
+{
+ public XACMLPolicy(String policyUri, PolicyMetaData metaData) throws PolicyException
+ {
+ super(policyUri, metaData);
+ }
+
+
+ @Override
+ public String generateSystemPolicy() throws PolicyException
+ {
+ ByteArrayOutputStream bos = null;
+ try
+ {
+ String xacmlXml = null;
+
+ //SetUp the Policy Header
+ ObjectFactory objectFactory = new ObjectFactory();
+ PolicyType policyType = new PolicyType();
+ policyType.setPolicyId(this.policyUri);
+ policyType.setVersion("2.0");
+ policyType.setRuleCombiningAlgId(new NoPermitMeansDeniedAlg().getIdentifier().toString());
+
+ TargetType targetType = new TargetType();
+ policyType.setTarget(targetType);
+
+ //Process Resource Matches as Targets for the Policy
+ List<AttributeExpression> resourceMatches = this.metaData.getTarget().getResourceMatches();
+ if(resourceMatches != null && !resourceMatches.isEmpty())
+ {
+ ResourcesType resourcesType = new ResourcesType();
+ targetType.setResources(resourcesType);
+ ResourceType resourceType = new ResourceType();
+
+ for(AttributeExpression resourceMatch: resourceMatches)
+ {
+ ResourceMatchType rmt = new ResourceMatchType();
+
+ rmt.setMatchId(resourceMatch.getFunctionId());
+
+ rmt.setResourceAttributeDesignator(AttributeDesignatorUtil.getAttributeDesignator(resourceMatch.getAttribute(), resourceMatch.
+ designatorMustBePresent()));
+
+ rmt.setAttributeValue(PolicyAttributeFactory
+ .createStringAttributeType(resourceMatch.getAttribute().getValue()));
+
+ resourceType.getResourceMatch().add(rmt);
+ }
+
+ resourcesType.getResource().add(resourceType);
+ }
+
+ //Process Action Matches as Targets for the Policy
+ List<AttributeExpression> targetActionMatches = this.metaData.getTarget().getActionMatches();
+ if(targetActionMatches != null && !targetActionMatches.isEmpty())
+ {
+ ActionsType actionsType = this.generateRuleActions(targetActionMatches);
+ targetType.setActions(actionsType);
+ }
+
+
+ //Process the Policy Rules
+ Set<Rule> rules = this.metaData.getRules();
+ if(rules != null && !rules.isEmpty())
+ {
+ for(Rule rule: rules)
+ {
+ RuleType ruleType = new RuleType();
+ ruleType.setRuleId(rule.getRuleId());
+ if(rule.getEffect() == Effect.PERMIT)
+ {
+ ruleType.setEffect(EffectType.PERMIT);
+ }
+ else
+ {
+ ruleType.setEffect(EffectType.DENY);
+ }
+
+ //Process the Rule Target
+ if(rule.getTarget() != null)
+ {
+ List<AttributeExpression> actionMatches = rule.getTarget().getActionMatches();
+ List<AttributeExpression> subjectMatches = rule.getTarget().getSubjectMatches();
+ TargetType ruleTarget = new TargetType();
+
+ if(actionMatches != null && !actionMatches.isEmpty())
+ {
+ ruleTarget.setActions(this.generateRuleActions(actionMatches));
+ }
+
+ if(subjectMatches != null && !subjectMatches.isEmpty())
+ {
+ ruleTarget.setSubjects(this.generateRuleSubjects(subjectMatches));
+ }
+
+ ruleType.setTarget(ruleTarget);
+ }
+
+ //Process the Rule Expression/Condition
+ if(rule.getExpression() != null)
+ {
+ ConditionType condition = this.generateCondition(objectFactory, rule.getExpression());
+ ruleType.setCondition(condition);
+ }
+
+ policyType.getCombinerParametersOrRuleCombinerParametersOrVariableDefinition().add(ruleType);
+ }
+ }
+
+ bos = new ByteArrayOutputStream();
+ PolicyUtil.marshall(bos, policyType);
+ xacmlXml = new String(bos.toByteArray());
+
+ return xacmlXml;
+ }
+ catch(Exception e)
+ {
+ throw new PolicyException(e);
+ }
+ finally
+ {
+ if(bos != null)
+ {
+ try{bos.close();}catch(IOException ioe){}
+ }
+ }
+ }
+ //------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+ private ActionsType generateRuleActions(List<AttributeExpression> actionMatches)
+ {
+ ActionsType actions = new ActionsType();
+
+ for(AttributeExpression action: actionMatches)
+ {
+ ActionType actionType = new ActionType();
+ ActionMatchType amct = new ActionMatchType();
+ amct.setMatchId(action.getFunctionId());
+ amct.setAttributeValue(PolicyAttributeFactory.createStringAttributeType(action.getAttribute().getValue()));
+ amct.setActionAttributeDesignator(AttributeDesignatorUtil.getAttributeDesignator(action.getAttribute(), true));
+ actionType.getActionMatch().add(amct);
+ actions.getAction().add(actionType);
+ }
+
+ return actions;
+ }
+
+ private SubjectsType generateRuleSubjects(List<AttributeExpression> subjectMatches)
+ {
+ SubjectsType subjects = new SubjectsType();
+
+ for(AttributeExpression subject: subjectMatches)
+ {
+ SubjectType subjectType = new SubjectType();
+ SubjectMatchType match = new SubjectMatchType();
+ match.setMatchId(subject.getFunctionId());
+ match.setAttributeValue(PolicyAttributeFactory.createStringAttributeType(subject.getAttribute().getValue()));
+ match.setSubjectAttributeDesignator((SubjectAttributeDesignatorType)AttributeDesignatorUtil.getAttributeDesignator(subject.getAttribute(), true));
+ subjectType.getSubjectMatch().add(match);
+ subjects.getSubject().add(subjectType);
+ }
+
+ return subjects;
+ }
+
+ /**
+ *
+ * @param expression
+ * @return
+ */
+ private ConditionType generateCondition(ObjectFactory objectFactory, Expression expression)
+ {
+ ConditionType condition = new ConditionType();
+
+ if(expression instanceof AttributeExpression)
+ {
+ AttributeExpression attributeExpression = (AttributeExpression)expression;
+
+ //Function to be applied
+ ApplyType apply = new ApplyType();
+ apply.setFunctionId(attributeExpression.getFunctionId());
+
+ //Value to check against
+ AttributeValueType attrValue = PolicyAttributeFactory.createStringAttributeType(attributeExpression.getAttribute().getValue());
+ JAXBElement<AttributeValueType> jaxbAttrValue = objectFactory.createAttributeValue(attrValue);
+ apply.getExpression().add(jaxbAttrValue);
+
+ //Place within the Context where this Value should exist during an Authorization Request
+ apply.getExpression().add(AttributeDesignatorUtil.getAttributeDesignatorXml(attributeExpression.getAttribute(), true));
+
+
+ condition.setExpression(objectFactory.createApply(apply));
+ }
+ else if(expression instanceof DroolsRuleExpression)
+ {
+ DroolsRuleExpression ruleExpression = (DroolsRuleExpression)expression;
+
+ //Function to be applied
+ ApplyType apply = new ApplyType();
+ apply.setFunctionId(ruleExpression.getFunctionId());
+
+
+ VariableReferenceType ruleReference = new VariableReferenceType();
+ ruleReference.setVariableId(ruleExpression.getRuleReference());
+ JAXBElement<VariableReferenceType> jaxbRuleReference = objectFactory.createVariableReference(ruleReference);
+ apply.getExpression().add(jaxbRuleReference);
+
+
+ condition.setExpression(objectFactory.createApply(apply));
+ }
+
+ return condition;
+ }
+}
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -246,6 +246,6 @@
assertTrue("Policy Store must not be empty!!", (policies != null && policies.length == 1));
log.info("------------------------------------------------------------------------------");
- log.info(policies[0].generateXACMLPolicy());
+ log.info(policies[0].generateSystemPolicy());
}
}
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -160,6 +160,6 @@
assertTrue("Policy Store must not be empty!!", (policies != null && policies.length == 1));
log.info("------------------------------------------------------------------------------");
- log.info(policies[0].generateXACMLPolicy());
+ log.info(policies[0].generateSystemPolicy());
}
}
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -224,6 +224,6 @@
assertTrue("Policy Store must not be empty!!", (policies != null && policies.length == 1));
log.info("------------------------------------------------------------------------------");
- log.info(policies[0].generateXACMLPolicy());
+ log.info(policies[0].generateSystemPolicy());
}
}
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestPolicyServer.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestPolicyServer.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestPolicyServer.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -61,6 +61,6 @@
assertTrue("Policy Store must not be empty!!", (policies != null && policies.length == 1));
log.info("------------------------------------------------------------------------------");
- log.info(policies[0].generateXACMLPolicy());
+ log.info(policies[0].generateSystemPolicy());
}
}
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java 2009-05-15 20:37:32 UTC (rev 13379)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java 2009-05-16 16:03:40 UTC (rev 13380)
@@ -77,7 +77,7 @@
assertTrue("Policy Store must not be empty!!", (policies != null && policies.length == 1));
log.info("------------------------------------------------------------------------------");
- log.info(policies[0].generateXACMLPolicy());
+ log.info(policies[0].generateSystemPolicy());
//Send an Enforcement request that should be allowed
this.enforce(this.createRequest(httpResource, true), true);
14 years, 12 months
JBoss Portal SVN: r13379 - modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-05-15 16:37:32 -0400 (Fri, 15 May 2009)
New Revision: 13379
Modified:
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java
Log:
testing implies function integrated with hierarchial tree of resources
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java 2009-05-15 20:20:17 UTC (rev 13378)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java 2009-05-15 20:37:32 UTC (rev 13379)
@@ -32,7 +32,6 @@
import org.jboss.security.authz.components.resource.URIResource;
import org.jboss.security.authz.components.subject.Roles;
-import org.jboss.security.authz.components.action.Operation;
import org.jboss.security.authz.components.action.Read;
import org.jboss.security.authz.components.action.Write;
import org.jboss.security.authz.components.action.Manage;
@@ -60,12 +59,12 @@
{
}
- public void testExplicitPermit() throws Exception
+ public void testExplicitPermitReadImpliedWithWrite() throws Exception
{
//SetUp Resource
URIResource resource = new URIResource();
resource.setUri(new URI("/root/level1/level2/index.html"));
- resource.setOperation(new Read());
+ resource.setOperation(new Write());
resource.addAllowed("user");
//Provision the new policy
@@ -81,13 +80,13 @@
this.enforce(this.createRequest(contextResource), true);
}
- /*public void testExplicitDeny() throws Exception
+ public void testExplicitDenyWriteNotImpliedWithRead() throws Exception
{
//SetUp Resource
URIResource resource = new URIResource();
resource.setUri(new URI("/root/level1/level2/index.html"));
resource.setOperation(new Read());
- resource.addDenied("user");
+ resource.addAllowed("user");
//Provision the new policy
PolicyMetaData metadata = resource.getPolicyMetaData();
@@ -96,18 +95,18 @@
//Go ahead and produce a RequestContext for a "Permit" Enforcement
URIResource contextResource = new URIResource();
contextResource.setUri(new URI("/root/level1/level2/index.html"));
- contextResource.setOperation(new Read());
+ contextResource.setOperation(new Write());
//Perform enforcement
this.enforce(this.createRequest(contextResource), false);
}
- public void testPermitInheritance() throws Exception
+ public void testPermitInheritanceWriteImpliedWithManage() throws Exception
{
//SetUp Resource
URIResource resource = new URIResource();
resource.setUri(new URI("/root/level1"));
- resource.setOperation(new Read());
+ resource.setOperation(new Manage());
resource.addAllowed("user");
//Provision the new policy
@@ -117,19 +116,19 @@
//Go ahead and produce a RequestContext for a "Permit" Enforcement
URIResource contextResource = new URIResource();
contextResource.setUri(new URI("/root/level1/level2/index.html"));
- contextResource.setOperation(new Read());
+ contextResource.setOperation(new Write());
//Perform enforcement
this.enforce(this.createRequest(contextResource), true);
}
- public void testDenyInheritance() throws Exception
+ public void testDenyInheritanceManageNotImpliedWithWrite() throws Exception
{
//SetUp Resource
URIResource resource = new URIResource();
resource.setUri(new URI("/root/level1"));
- resource.setOperation(new Read());
- resource.addDenied("user");
+ resource.setOperation(new Write());
+ resource.addAllowed("user");
//Provision the new policy
PolicyMetaData metadata = resource.getPolicyMetaData();
@@ -138,7 +137,7 @@
//Go ahead and produce a RequestContext for a "Permit" Enforcement
URIResource contextResource = new URIResource();
contextResource.setUri(new URI("/root/level1/level2/index.html"));
- contextResource.setOperation(new Read());
+ contextResource.setOperation(new Manage());
//Perform enforcement
this.enforce(this.createRequest(contextResource), false);
@@ -146,55 +145,35 @@
public void testDenyOverridesPermitInheritance() throws Exception
{
- //SetUp Permit policy
+ //SetUp Permit policy...User can write to level1
URIResource resource = new URIResource();
resource.setUri(new URI("/root/level1"));
- resource.setOperation(new Read());
+ resource.setOperation(new Write());
resource.addAllowed("user");
//Provision the new policy
PolicyMetaData metadata = resource.getPolicyMetaData();
policyServer.newPolicy(metadata);
- //Setup denied policy
+ //Setup denied policy....User can only read level2
resource = new URIResource();
resource.setUri(new URI("/root/level1/level2"));
resource.setOperation(new Read());
- resource.addDenied("user");
+ resource.addAllowed("user");
//Provision the new policy
metadata = resource.getPolicyMetaData();
policyServer.newPolicy(metadata);
//Go ahead and produce a RequestContext for a "Permit" Enforcement
+ //Trying to "Write" to level2 should be Denied
URIResource contextResource = new URIResource();
contextResource.setUri(new URI("/root/level1/level2/index.html"));
- contextResource.setOperation(new Read());
+ contextResource.setOperation(new Write());
//Perform enforcement
this.enforce(this.createRequest(contextResource), false);
- }
-
- public void testNotApplicable() throws Exception
- {
- //SetUp Resource
- URIResource resource = new URIResource();
- resource.setUri(new URI("/root2"));
- resource.setOperation(new Read());
- resource.addAllowed("user");
-
- //Provision the new policy
- PolicyMetaData metadata = resource.getPolicyMetaData();
- policyServer.newPolicy(metadata);
-
- //Go ahead and produce a RequestContext for a "Permit" Enforcement
- URIResource contextResource = new URIResource();
- contextResource.setUri(new URI("/root/level1/level2/index.html"));
- contextResource.setOperation(new Read());
-
- //Perform enforcement
- this.enforce(this.createRequest(contextResource), false);
- }*/
+ }
//------------------------------------------------------------------------------------------------------------------------------------------------------
private Request createRequest(URIResource uriResource) throws Exception
{
14 years, 12 months
JBoss Portal SVN: r13378 - in modules/authorization/trunk: core-components-api/src/main/java/org/jboss/security/authz/components/resource and 3 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-05-15 16:20:17 -0400 (Fri, 15 May 2009)
New Revision: 13378
Added:
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java
Modified:
modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Manage.java
modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Operation.java
modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Write.java
modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/resource/HttpResource.java
modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/resource/URIResource.java
modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java
modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java
Log:
fixed implied permission functionality
Modified: modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Manage.java
===================================================================
--- modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Manage.java 2009-05-15 14:45:29 UTC (rev 13377)
+++ modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Manage.java 2009-05-15 20:20:17 UTC (rev 13378)
@@ -21,11 +21,10 @@
*/
package org.jboss.security.authz.components.action;
-import org.jboss.security.authz.model.Attribute;
-import org.jboss.security.authz.model.Action;
+import java.util.ArrayList;
+import java.util.List;
-import org.jboss.security.xacml.interfaces.XACMLConstants;
-import org.jboss.security.xacml.interfaces.XMLSchemaConstants;
+import org.jboss.security.authz.model.Target;
/**
* Read represents a "manage" action that can be performed on a Resource
@@ -42,21 +41,14 @@
}
@Override
- public Action getAction()
- {
- Action action = super.getAction();
-
- Attribute impliesRead = new Attribute(XACMLConstants.ATTRIBUTEID_ACTION_ID,
- XMLSchemaConstants.DATATYPE_STRING,
- new Read().getName()
- );
- Attribute impliesWrite = new Attribute(XACMLConstants.ATTRIBUTEID_ACTION_ID,
- XMLSchemaConstants.DATATYPE_STRING,
- new Write().getName()
- );
- action.addAttribute(impliesRead);
- action.addAttribute(impliesWrite);
-
- return action;
- }
+ public List<Target> getTargets()
+ {
+ List<Target> manageTargets = new ArrayList<Target>();
+ Write write = new Write();
+
+ manageTargets.addAll(super.getTargets());
+ manageTargets.addAll(write.getTargets());
+
+ return manageTargets;
+ }
}
Modified: modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Operation.java
===================================================================
--- modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Operation.java 2009-05-15 14:45:29 UTC (rev 13377)
+++ modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Operation.java 2009-05-15 20:20:17 UTC (rev 13378)
@@ -21,6 +21,9 @@
*/
package org.jboss.security.authz.components.action;
+import java.util.List;
+import java.util.ArrayList;
+
import org.jboss.security.authz.model.Attribute;
import org.jboss.security.authz.model.AttributeExpression;
import org.jboss.security.authz.model.Target;
@@ -52,10 +55,11 @@
*
* @return target
*/
- public Target getTarget()
+ public List<Target> getTargets()
{
+ List<Target> targets = new ArrayList<Target>();
+
Target target = new Target();
-
AttributeExpression expression = new AttributeExpression();
expression.setFunctionId(XACMLConstants.FUNCTION_STRING_EQUAL);
Attribute attribute = new Attribute(XACMLConstants.ATTRIBUTEID_ACTION_ID,
@@ -63,8 +67,9 @@
expression.setAttribute(attribute);
target.addActionMatch(expression);
+ targets.add(target);
- return target;
+ return targets;
}
//-------Request Context Generation Services-------------------------------------------------------------------------------------------------------------
/**
Modified: modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Write.java
===================================================================
--- modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Write.java 2009-05-15 14:45:29 UTC (rev 13377)
+++ modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/action/Write.java 2009-05-15 20:20:17 UTC (rev 13378)
@@ -21,11 +21,10 @@
*/
package org.jboss.security.authz.components.action;
-import org.jboss.security.authz.model.Attribute;
-import org.jboss.security.authz.model.Action;
+import java.util.List;
+import java.util.ArrayList;
-import org.jboss.security.xacml.interfaces.XACMLConstants;
-import org.jboss.security.xacml.interfaces.XMLSchemaConstants;
+import org.jboss.security.authz.model.Target;
/**
* Read represents a "write" action that can be performed on a Resource
@@ -39,19 +38,17 @@
public Write()
{
this.name = "write";
- }
-
+ }
+
@Override
- public Action getAction()
- {
- Action action = super.getAction();
-
- Attribute impliesRead = new Attribute(XACMLConstants.ATTRIBUTEID_ACTION_ID,
- XMLSchemaConstants.DATATYPE_STRING,
- new Read().getName()
- );
- action.addAttribute(impliesRead);
-
- return action;
- }
+ public List<Target> getTargets()
+ {
+ List<Target> writeTargets = new ArrayList<Target>();
+ Read read = new Read();
+
+ writeTargets.addAll(super.getTargets());
+ writeTargets.addAll(read.getTargets());
+
+ return writeTargets;
+ }
}
Modified: modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/resource/HttpResource.java
===================================================================
--- modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/resource/HttpResource.java 2009-05-15 14:45:29 UTC (rev 13377)
+++ modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/resource/HttpResource.java 2009-05-15 20:20:17 UTC (rev 13378)
@@ -25,6 +25,7 @@
import java.util.Map;
import java.util.Set;
import java.util.HashMap;
+import java.util.List;
import org.jboss.security.authz.model.AttributeExpression;
import org.jboss.security.authz.model.Attribute;
@@ -128,8 +129,8 @@
XMLSchemaConstants.DATATYPE_STRING, this.httpMethod.getName());
actionExpression.setAttribute(attribute);
- Target actionTarget = this.httpMethod.getTarget();
- metadata.getTarget().addActionMatch(actionTarget.getActionMatches().iterator().next());
+ List<Target> actionTarget = this.httpMethod.getTargets();
+ metadata.getTarget().addActionMatch(actionTarget.iterator().next().getActionMatches().iterator().next());
}
return metadata;
Modified: modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/resource/URIResource.java
===================================================================
--- modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/resource/URIResource.java 2009-05-15 14:45:29 UTC (rev 13377)
+++ modules/authorization/trunk/core-components-api/src/main/java/org/jboss/security/authz/components/resource/URIResource.java 2009-05-15 20:20:17 UTC (rev 13378)
@@ -24,6 +24,8 @@
import java.net.URI;
import java.util.HashSet;
import java.util.Set;
+import java.util.List;
+import java.util.ArrayList;
import org.jboss.security.authz.model.PolicyMetaData;
import org.jboss.security.authz.model.Target;
@@ -31,7 +33,6 @@
import org.jboss.security.authz.model.AttributeExpression;
import org.jboss.security.authz.model.Resource;
import org.jboss.security.authz.model.Attribute;
-import org.jboss.security.authz.xacml.ExpressionBuilder;
import org.jboss.security.authz.components.subject.Roles;
import org.jboss.security.authz.components.action.Operation;
@@ -184,16 +185,29 @@
*
* @return the rule
*/
- private Rule allowIfUserHasRole()
- {
- Rule rule = this.getAllowed().allowIfUserHasRole();
-
- if(this.operation != null)
- {
- rule.setTarget(this.operation.getTarget());
- }
-
- return rule;
+ private List<Rule> allowIfUserHasRole()
+ {
+ List<Rule> rules = new ArrayList<Rule>();
+
+ if(this.operation != null)
+ {
+ List<Target> targets = this.operation.getTargets();
+ if(targets != null)
+ {
+ for(Target target: targets)
+ {
+ Rule rule = this.getAllowed().allowIfUserHasRole();
+ rule.setTarget(target);
+ rules.add(rule);
+ }
+ }
+ }
+ else
+ {
+ rules.add(this.getAllowed().allowIfUserHasRole());
+ }
+
+ return rules;
}
/**
@@ -201,16 +215,29 @@
*
* @return the role
*/
- private Rule denyIfUserHasRole()
- {
- Rule rule = this.getDenied().denyIfUserHasRole();
-
- if(this.operation != null)
- {
- rule.setTarget(this.operation.getTarget());
- }
-
- return rule;
+ private List<Rule> denyIfUserHasRole()
+ {
+ List<Rule> rules = new ArrayList<Rule>();
+
+ if(this.operation != null)
+ {
+ List<Target> targets = this.operation.getTargets();
+ if(targets != null)
+ {
+ for(Target target: targets)
+ {
+ Rule rule = this.getDenied().denyIfUserHasRole();
+ rule.setTarget(target);
+ rules.add(rule);
+ }
+ }
+ }
+ else
+ {
+ rules.add(this.getDenied().denyIfUserHasRole());
+ }
+
+ return rules;
}
/**
@@ -229,13 +256,13 @@
//Permitted Roles
if(this.allowed != null)
{
- rules.add(this.allowIfUserHasRole());
+ rules.addAll(this.allowIfUserHasRole());
}
//Denied Roles
if(this.denied != null)
{
- rules.add(this.denyIfUserHasRole());
+ rules.addAll(this.denyIfUserHasRole());
}
metadata.setTarget(target);
Modified: modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java
===================================================================
--- modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java 2009-05-15 14:45:29 UTC (rev 13377)
+++ modules/authorization/trunk/http-profile/src/test/java/org/jboss/security/authz/http/provisioning/TestHttpPolicyConfig.java 2009-05-15 20:20:17 UTC (rev 13378)
@@ -105,7 +105,7 @@
this.enforce(this.createGetRequest(incoming, new String[]{"anonymous"}), false);
}
- public void testBoardFiles() throws Exception
+ /*public void testBoardFiles() throws Exception
{
PolicyConfig config = new HttpPolicyConfig();
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("http-policy.xml");
@@ -183,7 +183,7 @@
//Anonymous is Not Allowed
this.enforce(this.createGetRequest(incoming, new String[]{"anonymous"}), false);
- }
+ }*/
//-------------------------------------------------------------------------------------------------------------------------------------------------
private void enforce(Request request, boolean mustBePermitted) throws Exception
{
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java 2009-05-15 14:45:29 UTC (rev 13377)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestHierarchialPropagation.java 2009-05-15 20:20:17 UTC (rev 13378)
@@ -91,7 +91,8 @@
//Provision the new policy
PolicyMetaData metadata = resource.getPolicyMetaData();
- policyServer.newPolicy(metadata);
+ policyServer.newPolicy(metadata);
+ this.assertServerState();
//Go ahead and produce a RequestContext for a "Permit" Enforcement
URIResource contextResource = new URIResource();
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java 2009-05-15 14:45:29 UTC (rev 13377)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliedActions.java 2009-05-15 20:20:17 UTC (rev 13378)
@@ -65,7 +65,7 @@
//SetUp Resource
URIResource resource = new URIResource();
resource.setUri(new URI("/blah/index.html"));
- resource.setOperation(new Read());
+ resource.setOperation(new Write());
resource.addAllowed("user");
@@ -75,7 +75,7 @@
this.assertServerState();
//Go ahead and produce a RequestContext for a "Permit" Enforcement
- this.enforce(this.createRequest(resource, new Write()), true);
+ this.enforce(this.createRequest(resource, new Read()), true);
}
public void testWriteImpliedWithManage() throws Exception
@@ -83,7 +83,7 @@
//SetUp Resource
URIResource resource = new URIResource();
resource.setUri(new URI("/blah/index.html"));
- resource.setOperation(new Write());
+ resource.setOperation(new Manage());
resource.addAllowed("user");
@@ -93,7 +93,7 @@
this.assertServerState();
//Go ahead and produce a RequestContext for a "Permit" Enforcement
- this.enforce(this.createRequest(resource, new Manage()), true);
+ this.enforce(this.createRequest(resource, new Write()), true);
}
public void testWriteNotImpliedWithRead() throws Exception
@@ -101,7 +101,7 @@
//SetUp Resource
URIResource resource = new URIResource();
resource.setUri(new URI("/blah/index.html"));
- resource.setOperation(new Write());
+ resource.setOperation(new Read());
resource.addAllowed("user");
@@ -111,7 +111,7 @@
this.assertServerState();
//Go ahead and produce a RequestContext for a "Deny" Enforcement
- this.enforce(this.createRequest(resource, new Read()), false);
+ this.enforce(this.createRequest(resource, new Write()), false);
}
//------------------------------------------------------------------------------------------------------------------------------------------------------
private Request createRequest(URIResource uriResource, Operation operation) throws Exception
Added: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java (rev 0)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/TestImpliesHierarchialPropagation.java 2009-05-15 20:20:17 UTC (rev 13378)
@@ -0,0 +1,250 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.security.authz.policy.server;
+
+import java.net.URI;
+
+import junit.framework.TestCase;
+import org.apache.log4j.Logger;
+
+import org.jboss.security.authz.model.Policy;
+import org.jboss.security.authz.model.PolicyMetaData;
+import org.jboss.security.authz.model.Resource;
+
+import org.jboss.security.authz.components.resource.URIResource;
+import org.jboss.security.authz.components.subject.Roles;
+import org.jboss.security.authz.components.action.Operation;
+import org.jboss.security.authz.components.action.Read;
+import org.jboss.security.authz.components.action.Write;
+import org.jboss.security.authz.components.action.Manage;
+
+import org.jboss.security.authz.enforcement.Request;
+import org.jboss.security.authz.enforcement.Response;
+import org.jboss.security.authz.policy.server.PolicyServer;
+
+/**
+ * @author <a href="mailto:sshah@redhat.com">Sohil Shah</a>
+ */
+public class TestImpliesHierarchialPropagation extends TestCase
+{
+ private static Logger log = Logger.getLogger(TestImpliesHierarchialPropagation.class);
+
+ private PolicyServer policyServer;
+
+ public void setUp() throws Exception
+ {
+ Server.bootstrap();
+ this.policyServer = (PolicyServer)Server.lookup("/policy-server/PolicyServer");
+ }
+
+ public void tearDown() throws Exception
+ {
+ }
+
+ public void testExplicitPermit() throws Exception
+ {
+ //SetUp Resource
+ URIResource resource = new URIResource();
+ resource.setUri(new URI("/root/level1/level2/index.html"));
+ resource.setOperation(new Read());
+ resource.addAllowed("user");
+
+ //Provision the new policy
+ PolicyMetaData metadata = resource.getPolicyMetaData();
+ policyServer.newPolicy(metadata);
+
+ //Go ahead and produce a RequestContext for a "Permit" Enforcement
+ URIResource contextResource = new URIResource();
+ contextResource.setUri(new URI("/root/level1/level2/index.html"));
+ contextResource.setOperation(new Read());
+
+ //Perform enforcement
+ this.enforce(this.createRequest(contextResource), true);
+ }
+
+ /*public void testExplicitDeny() throws Exception
+ {
+ //SetUp Resource
+ URIResource resource = new URIResource();
+ resource.setUri(new URI("/root/level1/level2/index.html"));
+ resource.setOperation(new Read());
+ resource.addDenied("user");
+
+ //Provision the new policy
+ PolicyMetaData metadata = resource.getPolicyMetaData();
+ policyServer.newPolicy(metadata);
+
+ //Go ahead and produce a RequestContext for a "Permit" Enforcement
+ URIResource contextResource = new URIResource();
+ contextResource.setUri(new URI("/root/level1/level2/index.html"));
+ contextResource.setOperation(new Read());
+
+ //Perform enforcement
+ this.enforce(this.createRequest(contextResource), false);
+ }
+
+ public void testPermitInheritance() throws Exception
+ {
+ //SetUp Resource
+ URIResource resource = new URIResource();
+ resource.setUri(new URI("/root/level1"));
+ resource.setOperation(new Read());
+ resource.addAllowed("user");
+
+ //Provision the new policy
+ PolicyMetaData metadata = resource.getPolicyMetaData();
+ policyServer.newPolicy(metadata);
+
+ //Go ahead and produce a RequestContext for a "Permit" Enforcement
+ URIResource contextResource = new URIResource();
+ contextResource.setUri(new URI("/root/level1/level2/index.html"));
+ contextResource.setOperation(new Read());
+
+ //Perform enforcement
+ this.enforce(this.createRequest(contextResource), true);
+ }
+
+ public void testDenyInheritance() throws Exception
+ {
+ //SetUp Resource
+ URIResource resource = new URIResource();
+ resource.setUri(new URI("/root/level1"));
+ resource.setOperation(new Read());
+ resource.addDenied("user");
+
+ //Provision the new policy
+ PolicyMetaData metadata = resource.getPolicyMetaData();
+ policyServer.newPolicy(metadata);
+
+ //Go ahead and produce a RequestContext for a "Permit" Enforcement
+ URIResource contextResource = new URIResource();
+ contextResource.setUri(new URI("/root/level1/level2/index.html"));
+ contextResource.setOperation(new Read());
+
+ //Perform enforcement
+ this.enforce(this.createRequest(contextResource), false);
+ }
+
+ public void testDenyOverridesPermitInheritance() throws Exception
+ {
+ //SetUp Permit policy
+ URIResource resource = new URIResource();
+ resource.setUri(new URI("/root/level1"));
+ resource.setOperation(new Read());
+ resource.addAllowed("user");
+
+ //Provision the new policy
+ PolicyMetaData metadata = resource.getPolicyMetaData();
+ policyServer.newPolicy(metadata);
+
+ //Setup denied policy
+ resource = new URIResource();
+ resource.setUri(new URI("/root/level1/level2"));
+ resource.setOperation(new Read());
+ resource.addDenied("user");
+
+ //Provision the new policy
+ metadata = resource.getPolicyMetaData();
+ policyServer.newPolicy(metadata);
+
+ //Go ahead and produce a RequestContext for a "Permit" Enforcement
+ URIResource contextResource = new URIResource();
+ contextResource.setUri(new URI("/root/level1/level2/index.html"));
+ contextResource.setOperation(new Read());
+
+ //Perform enforcement
+ this.enforce(this.createRequest(contextResource), false);
+ }
+
+ public void testNotApplicable() throws Exception
+ {
+ //SetUp Resource
+ URIResource resource = new URIResource();
+ resource.setUri(new URI("/root2"));
+ resource.setOperation(new Read());
+ resource.addAllowed("user");
+
+ //Provision the new policy
+ PolicyMetaData metadata = resource.getPolicyMetaData();
+ policyServer.newPolicy(metadata);
+
+ //Go ahead and produce a RequestContext for a "Permit" Enforcement
+ URIResource contextResource = new URIResource();
+ contextResource.setUri(new URI("/root/level1/level2/index.html"));
+ contextResource.setOperation(new Read());
+
+ //Perform enforcement
+ this.enforce(this.createRequest(contextResource), false);
+ }*/
+ //------------------------------------------------------------------------------------------------------------------------------------------------------
+ private Request createRequest(URIResource uriResource) throws Exception
+ {
+ //Create a RequestType
+ Request request = new Request();
+
+ //Enable Hierarchial Enforcement
+ request.setActivateHierarchialEnforcement(true);
+
+ //Create Resource
+ Resource urlResource = uriResource.getResource();
+ request.addResource(urlResource);
+
+ //Create Subjects
+ Roles roles = new Roles();
+ roles.addName("user");
+ request.addSubject(roles.getSubject());
+
+ //Create Action
+ request.setAction(uriResource.getOperation().getAction());
+
+ return request;
+ }
+
+ private void enforce(Request request, boolean mustBePermitted) throws Exception
+ {
+
+ Response response = this.policyServer.evaluate(request);
+
+ assertNotNull(response);
+ log.info("-----------------------------------");
+ log.info("Decision="+response.getMessage());
+
+ if(mustBePermitted)
+ {
+ assertTrue("Access must be granted!!!", response.isAccessGranted());
+ }
+ else
+ {
+ assertFalse("Access must be denied!!!", response.isAccessGranted());
+ }
+ }
+
+ private void assertServerState() throws Exception
+ {
+ //Assert Policy State of the Server
+ Policy[] policies = policyServer.readAllPolicies();
+
+ assertTrue("Policy Store must not be empty!!", (policies != null && policies.length == 1));
+ log.info("------------------------------------------------------------------------------");
+ log.info(policies[0].generateXACMLPolicy());
+ }
+}
Modified: modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java
===================================================================
--- modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java 2009-05-15 14:45:29 UTC (rev 13377)
+++ modules/authorization/trunk/policy-server/src/test/java/org/jboss/security/authz/policy/server/plugin/TestEnterprisePolicyFinderModule.java 2009-05-15 20:20:17 UTC (rev 13378)
@@ -66,6 +66,7 @@
httpResource.addParameter("param1", "param1Value");
httpResource.addParameter("param2", "param2Value");
httpResource.addAllowed("Admin");
+ httpResource.setOperation(new Read());
PolicyMetaData policyMetaData = httpResource.getPolicyMetaData();
policyServer.newPolicy(policyMetaData);
14 years, 12 months
JBoss Portal SVN: r13377 - in modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity: db and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-05-15 10:45:29 -0400 (Fri, 15 May 2009)
New Revision: 13377
Modified:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/RoleModule.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/db/HibernateRoleModuleImpl.java
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
Log:
- Added findRoleByDisplayName method (needed for JBPORTAL-2091).
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/RoleModule.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/RoleModule.java 2009-05-15 12:10:05 UTC (rev 13376)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/RoleModule.java 2009-05-15 14:45:29 UTC (rev 13377)
@@ -22,9 +22,6 @@
******************************************************************************/
package org.jboss.portal.identity;
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.Role;
-
import java.util.Set;
/**
@@ -44,6 +41,14 @@
Role findRoleByName(String name) throws IdentityException, IllegalArgumentException;
/**
+ * Retrieves a role by its display name
+ *
+ * @param displayName the display name of the Role to be retrieved
+ * @return the role associated to the specified display name
+ */
+ Role findRoleByDisplayName(String displayName) throws IdentityException, IllegalArgumentException;
+
+ /**
* Retrieve a collection of role from the role names.
*
* @param names the role names
@@ -97,7 +102,7 @@
* @return the roles
*/
Set findRoles() throws IdentityException;
-
+
/**
* Get all the administrator roles
*
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/db/HibernateRoleModuleImpl.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/db/HibernateRoleModuleImpl.java 2009-05-15 12:10:05 UTC (rev 13376)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/db/HibernateRoleModuleImpl.java 2009-05-15 14:45:29 UTC (rev 13377)
@@ -21,25 +21,23 @@
*/
package org.jboss.portal.identity.db;
-import org.jboss.portal.identity.Role;
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.db.HibernateRoleImpl;
-import org.jboss.portal.identity.User;
-import org.jboss.portal.identity.db.HibernateUserImpl;
-import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.identity.service.RoleModuleService;
-import org.hibernate.SessionFactory;
-import org.hibernate.Session;
import org.hibernate.Criteria;
import org.hibernate.HibernateException;
import org.hibernate.Query;
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.Role;
+import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.service.RoleModuleService;
import javax.naming.InitialContext;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
import java.util.Set;
-import java.util.Iterator;
-import java.util.HashSet;
-import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet </a>
@@ -52,44 +50,44 @@
{
/** . */
- private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(HibernateRoleModuleImpl.class);
- /** . */
- protected SessionFactory sessionFactory;
+ private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(HibernateRoleModuleImpl.class);
+ /** . */
+ protected SessionFactory sessionFactory;
- /** . */
- protected String sessionFactoryJNDIName;
+ /** . */
+ protected String sessionFactoryJNDIName;
- public void start() throws Exception
- {
- //
- sessionFactory = (SessionFactory)new InitialContext().lookup(sessionFactoryJNDIName);
+ public void start() throws Exception
+ {
+ //
+ sessionFactory = (SessionFactory)new InitialContext().lookup(sessionFactoryJNDIName);
- super.start();
- }
+ super.start();
+ }
- public void stop() throws Exception
- {
+ public void stop() throws Exception
+ {
- //
- sessionFactory = null;
+ //
+ sessionFactory = null;
- super.stop();
- }
+ super.stop();
+ }
// public SessionFactory getSessionFactory()
// {
// return sessionFactory;
// }
- public String getSessionFactoryJNDIName()
- {
- return sessionFactoryJNDIName;
- }
+ public String getSessionFactoryJNDIName()
+ {
+ return sessionFactoryJNDIName;
+ }
- public void setSessionFactoryJNDIName(String sessionFactoryJNDIName)
- {
- this.sessionFactoryJNDIName = sessionFactoryJNDIName;
- }
+ public void setSessionFactoryJNDIName(String sessionFactoryJNDIName)
+ {
+ this.sessionFactoryJNDIName = sessionFactoryJNDIName;
+ }
public Role findRoleByName(String name) throws IdentityException
@@ -122,6 +120,36 @@
}
}
+ public Role findRoleByDisplayName(String displayName) throws IdentityException
+ {
+ if (displayName != null)
+ {
+ try
+ {
+ Session session = getCurrentSession();
+ Criteria criteria = session.createCriteria(HibernateRoleImpl.class);
+ criteria.add(Restrictions.eq("displayName", displayName));
+ criteria.setCacheable(true);
+ HibernateRoleImpl role = (HibernateRoleImpl)criteria.uniqueResult();
+ if (role == null)
+ {
+ throw new IdentityException("No such role " + displayName);
+ }
+ return role;
+ }
+ catch (HibernateException e)
+ {
+ String message = "Cannot find role by display name " + displayName;
+ log.error(message, e);
+ throw new IdentityException(message, e);
+ }
+ }
+ else
+ {
+ throw new IllegalArgumentException("name cannot be null");
+ }
+ }
+
public Set findRolesByNames(String[] names) throws IdentityException
{
if (names != null)
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2009-05-15 12:10:05 UTC (rev 13376)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPRoleModuleImpl.java 2009-05-15 14:45:29 UTC (rev 13377)
@@ -22,12 +22,10 @@
******************************************************************************/
package org.jboss.portal.identity.ldap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Set;
+import org.jboss.portal.common.util.Tools;
+import org.jboss.portal.identity.IdentityConfiguration;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.identity.Role;
import javax.naming.NamingEnumeration;
import javax.naming.NamingException;
@@ -39,12 +37,13 @@
import javax.naming.directory.SearchControls;
import javax.naming.directory.SearchResult;
import javax.naming.ldap.LdapContext;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Set;
-import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.identity.IdentityConfiguration;
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.Role;
-
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
* @version $Revision: 1.1 $
@@ -79,8 +78,8 @@
throw new IdentityException("No such role " + name);
}
SearchResult res = (SearchResult)sr.iterator().next();
- DirContext ctx = (DirContext)res.getObject();
- return createRoleInstance(res.getAttributes(),ctx.getNameInNamespace());
+ DirContext ctx = (DirContext)res.getObject();
+ return createRoleInstance(res.getAttributes(), ctx.getNameInNamespace());
}
catch (NoSuchElementException e)
@@ -94,6 +93,47 @@
throw new IdentityException("No role found with name: " + name);
}
+ public Role findRoleByDisplayName(String displayName) throws IdentityException, IllegalArgumentException
+ {
+ try
+ {
+ log.debug("findRoleByDisplayName(): display name = " + displayName);
+
+ if (displayName == null)
+ {
+ throw new IdentityException("Role name canot be null");
+ }
+
+
+ String filter = "(".concat(getDisplayNameAttributeID()).concat("=").concat(displayName).concat(")");
+ log.debug("Search filter: " + filter);
+
+ List sr = searchRoles(filter, null);
+ if (sr.size() > 1)
+ {
+ throw new IdentityException("Found more than one role with display name: " + displayName + "" +
+ "Posible data inconsistency");
+ }
+ if (sr.size() == 0)
+ {
+ throw new IdentityException("No such role " + displayName);
+ }
+ SearchResult res = (SearchResult)sr.iterator().next();
+ DirContext ctx = (DirContext)res.getObject();
+ return createRoleInstance(res.getAttributes(), ctx.getNameInNamespace());
+
+ }
+ catch (NoSuchElementException e)
+ {
+ log.debug("No role found with display name: " + displayName, e);
+ }
+ catch (NamingException e)
+ {
+ throw new IdentityException("Role search failed.", e);
+ }
+ throw new IdentityException("No role found with display name: " + displayName);
+ }
+
public Set findRolesByNames(String[] names) throws IdentityException, IllegalArgumentException
{
if (names == null)
@@ -110,11 +150,11 @@
{
String name = names[i];
filter.append("(")
- .append(getRidAttributeID())
- .append("=")
- .append(name)
- .append(") ");
- }
+ .append(getRidAttributeID())
+ .append("=")
+ .append(name)
+ .append(") ");
+ }
filter.append(")");
List sr = searchRoles(filter.toString(), null);
@@ -122,8 +162,8 @@
for (Iterator iterator = sr.iterator(); iterator.hasNext();)
{
SearchResult res = (SearchResult)iterator.next();
- DirContext ctx = (DirContext)res.getObject();
- roles.add(createRoleInstance(res.getAttributes(),ctx.getNameInNamespace()));
+ DirContext ctx = (DirContext)res.getObject();
+ roles.add(createRoleInstance(res.getAttributes(), ctx.getNameInNamespace()));
}
}
catch (Exception e)
@@ -222,7 +262,7 @@
}
}
- Role resultRole = findRoleByName(name);
+ Role resultRole = findRoleByName(name);
fireRoleCreatedEvent(resultRole.getId(), resultRole.getName());
@@ -308,8 +348,8 @@
while (iter.hasNext())
{
SearchResult res = (SearchResult)iter.next();
- DirContext ctx = (DirContext)res.getObject();
- rf.add(createRoleInstance(res.getAttributes(),ctx.getNameInNamespace()));
+ DirContext ctx = (DirContext)res.getObject();
+ rf.add(createRoleInstance(res.getAttributes(), ctx.getNameInNamespace()));
}
}
catch (NoSuchElementException e)
@@ -324,8 +364,8 @@
}
/**
- * This method should be used by over modules to perform searches. It will allow role module
- * implementation to apply proper filter and search scope from the configuration
+ * This method should be used by over modules to perform searches. It will allow role module implementation to apply
+ * proper filter and search scope from the configuration
*
* @param filter that will be concatenated with proper role search filter from the module
* @return
@@ -377,5 +417,4 @@
}
-
}
15 years
JBoss Portal SVN: r13376 - in branches/JBoss_Portal_Branch_2_7/core-identity/src: main/org/jboss/portal/core/identity/ui/validators and 3 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-05-15 08:10:05 -0400 (Fri, 15 May 2009)
New Revision: 13376
Added:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/BaseRoleAction.java
Removed:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/RoleValidator.java
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_it.properties
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ja.properties
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_pt_BR.properties
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ru.properties
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/createRole.xhtml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml
Log:
- JBPORTAL-2390, JBPORTAL-2391:
+ Editable role and display names are now properly validated for XSS injection and handle duplicate error better
+ CreateRoleAction and EditRoleAction now inherit from BaseRoleAction which leverages ManagedBean functionality for input validation
+ Updated properties to add support for ManagedBean messages, removed duplicated key
+ Removed now unused RoleValidator and associated localization keys
Added: branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/BaseRoleAction.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/BaseRoleAction.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/BaseRoleAction.java 2009-05-15 12:10:05 UTC (rev 13376)
@@ -0,0 +1,90 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+package org.jboss.portal.core.identity.ui.actions;
+
+import org.jboss.portal.faces.gui.ManagedBean;
+import org.jboss.portal.identity.IdentityException;
+import org.jboss.portal.core.identity.ui.UIRole;
+import org.jboss.portal.core.identity.ui.common.IdentityRoleBean;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class BaseRoleAction extends ManagedBean
+{
+ /** .*/
+ protected UIRole uiRole;
+ /** .*/
+ protected IdentityRoleBean identityRoleBean;
+
+ protected String getObjectTypeName()
+ {
+ return "ROLE_TYPE";
+ }
+
+ public boolean isAlreadyExisting(String objectName)
+ {
+ try
+ {
+ return identityRoleBean.getRoleModule().findRoleByName(objectName) != null;
+ }
+ catch (IdentityException e)
+ {
+ // due to current design of identity module, findRoleByName throws an exception if the role is not found
+ // instead of returning null as would be traditionally expected... Pb is IdentityException is also used to
+ // wrap HibernateExceptions...
+ if (e.getMessage().contains("No such role"))
+ {
+ // ignore
+ }
+ else
+ {
+ log.error("Error validation rolename", e);
+ beanContext.createErrorMessageFrom(e);
+ }
+ return false;
+ }
+ }
+
+ public UIRole getUiRole()
+ {
+ return uiRole;
+ }
+
+ public void setUiRole(UIRole uiRole)
+ {
+ this.uiRole = uiRole;
+ }
+
+ public IdentityRoleBean getIdentityRoleBean()
+ {
+ return identityRoleBean;
+ }
+
+ public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
+ {
+ this.identityRoleBean = identityRoleBean;
+ }
+}
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/CreateRoleAction.java 2009-05-15 12:10:05 UTC (rev 13376)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -23,52 +23,39 @@
package org.jboss.portal.core.identity.ui.actions;
import org.jboss.portal.core.identity.ui.UIRole;
-import org.jboss.portal.core.identity.ui.common.IdentityRoleBean;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-public class CreateRoleAction
+public class CreateRoleAction extends BaseRoleAction
{
-
- /** .*/
- private UIRole uiRole = new UIRole();
-
- /** .*/
- private IdentityRoleBean identityRoleBean;
-
- public UIRole getUiRole()
+ public CreateRoleAction()
{
- return uiRole;
+ uiRole = new UIRole();
}
- public void setUiRole(UIRole uiRole)
- {
- this.uiRole = uiRole;
- }
-
- public IdentityRoleBean getIdentityRoleBean()
- {
- return identityRoleBean;
- }
-
- public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
- {
- this.identityRoleBean = identityRoleBean;
- }
-
public String createRole()
{
- try
+ String name = this.uiRole.getName();
+ String displayName = this.uiRole.getDisplayName();
+ name = checkNameValidity(name, "create-role-form:rolename");
+ displayName = checkNameValidity(displayName, "create-role-form:roledisplayname", false);
+
+ if (name != null && displayName != null)
{
- identityRoleBean.getRoleModule().createRole(this.uiRole.getName(), this.uiRole.getDisplayName());
+ try
+ {
+ identityRoleBean.getRoleModule().createRole(name, displayName);
+ return "roleAdmin";
+ }
+ catch (Exception e)
+ {
+ log.error("An error occurred during role creation", e);
+ beanContext.createErrorMessageFrom(e);
+ }
}
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return "roleAdmin";
- }
+ return null;
+ }
}
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/actions/EditRoleAction.java 2009-05-15 12:10:05 UTC (rev 13376)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -22,83 +22,52 @@
******************************************************************************/
package org.jboss.portal.core.identity.ui.actions;
-import java.util.Map;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-
import org.jboss.portal.common.text.FastURLDecoder;
-import org.jboss.portal.core.identity.ui.UIRole;
-import org.jboss.portal.core.identity.ui.common.IdentityRoleBean;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-public class EditRoleAction
+public class EditRoleAction extends BaseRoleAction
{
- /** .*/
- private String currentRole;
-
- /** .*/
- private UIRole uiRole;
-
- /** .*/
- private IdentityRoleBean identityRoleBean;
-
/** . */
private static final FastURLDecoder decoder = FastURLDecoder.getUTF8Instance();
- public UIRole getUiRole()
- {
- return uiRole;
- }
-
- public void setUiRole(UIRole uiRole)
- {
- this.uiRole = uiRole;
- }
-
- public IdentityRoleBean getIdentityRoleBean()
- {
- return identityRoleBean;
- }
-
- public void setIdentityRoleBean(IdentityRoleBean identityRoleBean)
- {
- this.identityRoleBean = identityRoleBean;
- }
-
public String editRole()
{
- FacesContext ctx = FacesContext.getCurrentInstance();
- ExternalContext ectx = ctx.getExternalContext();
- Map params = ectx.getRequestParameterMap();
- this.currentRole = params.get("currentRole") != null ? decoder.encode((String) params.get("currentRole")) : null;
+ String currentRole = beanContext.getParameter("currentRole");
+ currentRole = (currentRole != null ? decoder.encode(currentRole) : null);
try
{
- this.uiRole = identityRoleBean.getUIRole(this.currentRole);
+ this.uiRole = identityRoleBean.getUIRole(currentRole);
return "editRole";
}
catch (Exception e)
{
- e.printStackTrace();
+ log.error("Couldn't edit role " + currentRole, e);
+ beanContext.createErrorMessageFrom(e);
}
return "roleAdmin";
}
public String updateRole()
{
- try
+ String roleDisplayName = this.uiRole.getDisplayName();
+ roleDisplayName = checkNameValidity(roleDisplayName, "edit-role-link:display-name", false); // do not check for duplicates
+ if (roleDisplayName != null)
{
- identityRoleBean.updateRoleDisplayName(this.uiRole.getName(), this.uiRole.getDisplayName());
+ try
+ {
+ identityRoleBean.updateRoleDisplayName(this.uiRole.getName(), roleDisplayName);
+ return "roleAdmin";
+ }
+ catch (Exception e)
+ {
+ beanContext.createErrorMessageFrom(e);
+ }
}
- catch (Exception e)
- {
- e.printStackTrace();
- }
- return "roleAdmin";
+ return null;
}
}
Deleted: branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/RoleValidator.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/RoleValidator.java 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/main/org/jboss/portal/core/identity/ui/validators/RoleValidator.java 2009-05-15 12:10:05 UTC (rev 13376)
@@ -1,88 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.core.identity.ui.validators;
-
-import java.util.ResourceBundle;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.validator.Validator;
-import javax.faces.validator.ValidatorException;
-import javax.portlet.PortletContext;
-
-import org.jboss.portal.identity.IdentityException;
-import org.jboss.portal.identity.Role;
-import org.jboss.portal.identity.RoleModule;
-
-/**
- * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision$
- */
-
-public class RoleValidator implements Validator
-{
- /** The role module */
- private RoleModule roleModule;
-
- /** The logger */
- private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger(RoleValidator.class);
-
- public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
- {
- String rolename = (String) value;
- ResourceBundle bundle = ResourceBundle.getBundle("conf.bundles.Identity", context.getViewRoot().getLocale());
- PortletContext portletContext = (PortletContext) context.getExternalContext().getContext();
- roleModule = (RoleModule) portletContext.getAttribute("RoleModule");
-
- try
- {
- @SuppressWarnings("unused")
- Role u = roleModule.findRoleByName(rolename);
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN"),
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN")));
- }
- catch (IllegalArgumentException e)
- {
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR"),
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR")));
- }
- catch (IdentityException e)
- {
- // TODO: Throw a catchable error
- if (e.getMessage().contains("No such role"))
- {
- // ignore
- }
- else
- {
- log.error("Error validation rolename", e);
- throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR"),
- bundle.getString("IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR")));
- }
- }
- }
-}
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity.properties 2009-05-15 12:10:05 UTC (rev 13376)
@@ -116,7 +116,6 @@
IDENTITY_MANAGEMENT_ROLE_ASSIGNED=Assigned roles
IDENTITY_MANAGEMENT_CREATE_ROLE=Create new role
IDENTITY_MANAGEMENT_EDIT_ROLE=Edit role
-IDENTITY_MANAGEMENT_CREATE_ROLE=Create role
IDENTITY_MANAGEMENT_DISABLE=Disable
IDENTITY_MANAGEMENT_DISABLE_USER_DISABLED=User disabled
IDENTITY_MANAGEMENT_ENABLE=Enable
@@ -171,14 +170,16 @@
IDENTITY_VALIDATION_ERROR_REGISTRATION=Failed to register user.
IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN=This username is already taken.
IDENTITY_VALIDATION_ERROR_USERNAME_ERROR=Error while validating the username.
-IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN=This role name is already taken.
-IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR=Error while validating the role name.
IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH=The passwords doesn't match.
IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR=Error while validating password.
IDENTITY_VALIDATION_ERROR_INVALID_EMAIL=Invalid E-Mail address.
IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD=Invalid password
IDENTITY_VALIDATION_ERROR_CAPTCHA_INCORRECT=Captcha incorrect
+ROLE_TYPE=role
+INVALID_NAME_ERROR=''{0}'' is an invalid {1} name: Cannot be null, empty or contain '\\', '<', '>', '(', ')', '=' or '%5c'
+DUPLICATE_ERROR=A {1} named ''{0}'' already exists!
+
# Example usage for dynamic values
IDENTITY_DYNAMIC_VALUE_TEST=test label
IDENTITY_DYNAMIC_VALUE_TEST2=test label2
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_fr.properties 2009-05-15 12:10:05 UTC (rev 13376)
@@ -24,7 +24,7 @@
IDENTITY_AIM = Identifiant AIM
-IDENTITY_APPLICATION_NOT_AVAILABLE = Portlet non disponible. V\u00E9rifiez votre configuration et les journaux syst\u00E8me pour plus d'information.
+IDENTITY_APPLICATION_NOT_AVAILABLE = Portlet non disponible. V\u00e9rifiez votre configuration et les journaux syst\u00e8me pour plus d'information.
IDENTITY_BUTTON_CANCEL = Annuler
@@ -32,19 +32,19 @@
IDENTITY_BUTTON_SUBMIT = Soumettre
-IDENTITY_CATEGORY_ADDITIONAL = Information compl\u00E9mentaire
+IDENTITY_CATEGORY_ADDITIONAL = Information compl\u00e9mentaire
-IDENTITY_CATEGORY_ADDITIONAL_EXTRA = (255 caract\u00E8res max.)
+IDENTITY_CATEGORY_ADDITIONAL_EXTRA = (255 caract\u00e8res max.)
-IDENTITY_CATEGORY_ADDITIONAL_SIGNATURE = (Signature de 255 caract\u00E8res max)
+IDENTITY_CATEGORY_ADDITIONAL_SIGNATURE = (Signature de 255 caract\u00e8res max)
-IDENTITY_CATEGORY_GENERAL = Pr\u00E9f\u00E9rences g\u00E9n\u00E9rales
+IDENTITY_CATEGORY_GENERAL = Pr\u00e9f\u00e9rences g\u00e9n\u00e9rales
-IDENTITY_CATEGORY_INSTANT = Comptes de messagerie instantan\u00E9e
+IDENTITY_CATEGORY_INSTANT = Comptes de messagerie instantan\u00e9e
IDENTITY_CATEGORY_PERSONAL = Informations personnelles
-IDENTITY_CREATE_ACCOUNT = Vous pouvez cr\u00E9er un compte.
+IDENTITY_CREATE_ACCOUNT = Vous pouvez cr\u00e9er un compte.
# Example usage for dynamic values
IDENTITY_DYNAMIC_VALUE_TEST = test label
@@ -55,15 +55,15 @@
IDENTITY_EDIT_CHANGE_EMAIL_ERROR = Impossible de changer l'adresse de courriel.
-IDENTITY_EDIT_CHANGE_EMAIL_STATUS_CHANGED = Votre adresse de courriel a \u00E9t\u00E9 mise \u00E0 jour.
+IDENTITY_EDIT_CHANGE_EMAIL_STATUS_CHANGED = Votre adresse de courriel a \u00e9t\u00e9 mise \u00e0 jour.
-IDENTITY_EDIT_CHANGE_EMAIL_STATUS_PENDING = Un courriel a \u00E9t\u00E9 envoy\u00E9 \u00E0 l'adresse indiqu\u00E9e afin d'en confirmer la validit\u00E9.
+IDENTITY_EDIT_CHANGE_EMAIL_STATUS_PENDING = Un courriel a \u00e9t\u00e9 envoy\u00e9 \u00e0 l'adresse indiqu\u00e9e afin d'en confirmer la validit\u00e9.
IDENTITY_EDIT_CHANGE_PASSWORD = Changer mon mot de passe
IDENTITY_EDIT_CHANGE_PASSWORD_ERROR = Impossible de changer votre mot de passe.
-IDENTITY_EDIT_CHANGE_PASSWOR_STATUS = Votre mot de passe a \u00E9t\u00E9 modifi\u00E9.
+IDENTITY_EDIT_CHANGE_PASSWOR_STATUS = Votre mot de passe a \u00e9t\u00e9 modifi\u00e9.
IDENTITY_EDIT_EMAIL_NEW = Nouvelle adresse courriel
@@ -73,39 +73,39 @@
IDENTITY_EDIT_PASSWORD_TITLE = Changer mon mot de passe
-IDENTITY_EDIT_PROFILE_ERROR = Erreur lors de la mise \u00E0 jour de votre profil.
+IDENTITY_EDIT_PROFILE_ERROR = Erreur lors de la mise \u00e0 jour de votre profil.
IDENTITY_EDIT_PROFILE_TITLE = Modifier mon profil
IDENTITY_EMAIL = Courriel
-IDENTITY_ENABLED = Activ\u00E9
+IDENTITY_ENABLED = Activ\u00e9
IDENTITY_EXTRA = Extra
IDENTITY_FAMILYNAME = Nom
-IDENTITY_GIVENNAME = Pr\u00E9nom
+IDENTITY_GIVENNAME = Pr\u00e9nom
IDENTITY_HOMEPAGE = Page web
-IDENTITY_ICQ = Num\u00E9ro Icq
+IDENTITY_ICQ = Num\u00e9ro Icq
-IDENTITY_INTERESTS = Centres d'int\u00E9r\u00EAts
+IDENTITY_INTERESTS = Centres d'int\u00e9r\u00eats
-IDENTITY_LAST_LOGIN = Derni\u00E8re visite
+IDENTITY_LAST_LOGIN = Derni\u00e8re visite
IDENTITY_LOCALE = Langue
-IDENTITY_LOCATION = Lieu de r\u00E9sidence
+IDENTITY_LOCATION = Lieu de r\u00e9sidence
IDENTITY_LOST_PASSWORD = Mot de passe perdu
-IDENTITY_LOST_PASSWORD_DESCRIPTION = Veuillez entrer votre identifiant afin de r\u00E9initialiser votre mot de passe.
+IDENTITY_LOST_PASSWORD_DESCRIPTION = Veuillez entrer votre identifiant afin de r\u00e9initialiser votre mot de passe.
-IDENTITY_LOST_PASSWORD_ERROR = \u00C9chec de r\u00E9initialisation de votre mot de passe.
+IDENTITY_LOST_PASSWORD_ERROR = \u00c9chec de r\u00e9initialisation de votre mot de passe.
-IDENTITY_LOST_PASSWORD_STATUS_404 = Aucun compte trouv\u00E9.
+IDENTITY_LOST_PASSWORD_STATUS_404 = Aucun compte trouv\u00e9.
IDENTITY_LOST_PASSWORD_STATUS_SUCCESSFUL = Vous receverez sous peu via courriel votre nouveau mot de passe.
@@ -115,7 +115,7 @@
IDENTITY_MAIL_SUBJECT_CHANGE_EMAIL = Confirmer l'adresse de courriel
-IDENTITY_MAIL_SUBJECT_LOST_PASSWORD = R\u00E9initialiser mon mot de passe
+IDENTITY_MAIL_SUBJECT_LOST_PASSWORD = R\u00e9initialiser mon mot de passe
IDENTITY_MAIL_SUBJECT_REGISTER = Confirmer mon enregistrement
@@ -125,39 +125,39 @@
IDENTITY_MANAGEMENT_ACTION_EDIT_PROFILE = Modifier
-IDENTITY_MANAGEMENT_ACTION_ROLES = R\u00F4les
+IDENTITY_MANAGEMENT_ACTION_ROLES = R\u00f4les
-IDENTITY_MANAGEMENT_APPROVE_ALL = Approuver la s\u00E9lection
+IDENTITY_MANAGEMENT_APPROVE_ALL = Approuver la s\u00e9lection
-IDENTITY_MANAGEMENT_ASSIGN_ROLES = Assigner un r\u00F4le
+IDENTITY_MANAGEMENT_ASSIGN_ROLES = Assigner un r\u00f4le
IDENTITY_MANAGEMENT_COUNT_PENDING_USERS = Comptes en attente d'approbation
-IDENTITY_MANAGEMENT_COUNT_REGISTERED_USERS = Utilisateurs enregistr\u00E9s
+IDENTITY_MANAGEMENT_COUNT_REGISTERED_USERS = Utilisateurs enregistr\u00e9s
-IDENTITY_MANAGEMENT_CREATE_ROLE = Cr\u00E9er un nouveau r\u00F4le
+IDENTITY_MANAGEMENT_CREATE_ROLE = Cr\u00e9er un nouveau r\u00f4le
-IDENTITY_MANAGEMENT_CREATE_USER = Cr\u00E9er un nouveau compte utilisateur
+IDENTITY_MANAGEMENT_CREATE_USER = Cr\u00e9er un nouveau compte utilisateur
-IDENTITY_MANAGEMENT_CREATE_USER_CREATED = Compte cr\u00E9\u00E9
+IDENTITY_MANAGEMENT_CREATE_USER_CREATED = Compte cr\u00e9\u00e9
IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_AUTOMATIC = Automatique - pas de validation par courriel et pas d'approbation
-IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_CUSTOM = Mode d'abonnement personnalis\u00E9
+IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_CUSTOM = Mode d'abonnement personnalis\u00e9
IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL = Validation par courriel et pas d'approbation
IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL_ADMIN = Validation par courriel et approbation par un administrateur
-IDENTITY_MANAGEMENT_DISABLE = D\u00E9sactiver
+IDENTITY_MANAGEMENT_DISABLE = D\u00e9sactiver
-IDENTITY_MANAGEMENT_EDIT_ROLE = Modifier le r\u00F4le
+IDENTITY_MANAGEMENT_EDIT_ROLE = Modifier le r\u00f4le
IDENTITY_MANAGEMENT_ENABLE = Activer
-IDENTITY_MANAGEMENT_ERROR_ACTION_ROLE = Impossible d'effectuer l'op\u00E9ration demand\u00E9e sur ce r\u00F4le. Consultez le journal syst\u00E8me pour plus de d\u00E9tails.
+IDENTITY_MANAGEMENT_ERROR_ACTION_ROLE = Impossible d'effectuer l'op\u00e9ration demand\u00e9e sur ce r\u00f4le. Consultez le journal syst\u00e8me pour plus de d\u00e9tails.
-IDENTITY_MANAGEMENT_ERROR_ACTION_USER = Impossible d'effectuer l'op\u00E9ration demand\u00E9e sur ce compte. Consultez le journal syst\u00E8me pour plus de d\u00E9tails.
+IDENTITY_MANAGEMENT_ERROR_ACTION_USER = Impossible d'effectuer l'op\u00e9ration demand\u00e9e sur ce compte. Consultez le journal syst\u00e8me pour plus de d\u00e9tails.
IDENTITY_MANAGEMENT_MATRIX = Matrice
@@ -169,27 +169,27 @@
IDENTITY_MANAGEMENT_PENDING_REJECT = rejeter
-IDENTITY_MANAGEMENT_REJECT_ALL = Rejeter la s\u00E9lection
+IDENTITY_MANAGEMENT_REJECT_ALL = Rejeter la s\u00e9lection
-IDENTITY_MANAGEMENT_RESET_PASSWORD = R\u00E9initialiser le mot de passe
+IDENTITY_MANAGEMENT_RESET_PASSWORD = R\u00e9initialiser le mot de passe
-IDENTITY_MANAGEMENT_RESET_PASSWORD_DESCRIPTION = L'utilisateur recevera un nouveau mot de passe al\u00E9atoire envoy\u00E9 via courriel.
+IDENTITY_MANAGEMENT_RESET_PASSWORD_DESCRIPTION = L'utilisateur recevera un nouveau mot de passe al\u00e9atoire envoy\u00e9 via courriel.
-IDENTITY_MANAGEMENT_RESET_PASSWORD_FOR_USER = R\u00E9initialiser le mot de passe pour l'usager
+IDENTITY_MANAGEMENT_RESET_PASSWORD_FOR_USER = R\u00e9initialiser le mot de passe pour l'usager
-IDENTITY_MANAGEMENT_ROLE = R\u00F4le
+IDENTITY_MANAGEMENT_ROLE = R\u00f4le
-IDENTITY_MANAGEMENT_ROLE_ASSIGNED = R\u00F4les assign\u00E9s
+IDENTITY_MANAGEMENT_ROLE_ASSIGNED = R\u00f4les assign\u00e9s
IDENTITY_MANAGEMENT_ROLE_DISPLAY = Nom courant
-IDENTITY_MANAGEMENT_ROLE_MANAGEMENT = Gestion des r\u00F4les
+IDENTITY_MANAGEMENT_ROLE_MANAGEMENT = Gestion des r\u00f4les
IDENTITY_MANAGEMENT_ROLE_MEMBERS = Membres
IDENTITY_MANAGEMENT_SEARCH_USER = Rechercher
-IDENTITY_MANAGEMENT_SELECT_ALL = Tout s\u00E9lectionner
+IDENTITY_MANAGEMENT_SELECT_ALL = Tout s\u00e9lectionner
IDENTITY_MANAGEMENT_SUBSCRIPTION_ADMIN_MODE = Administrer les modes d'abonnement
@@ -197,17 +197,17 @@
IDENTITY_MANAGEMENT_SUBSCRIPTION_MODES = Modes d'abonnement
-IDENTITY_MANAGEMENT_UNSELECT_ALL = Tout d\u00E9s\u00E9lectionner
+IDENTITY_MANAGEMENT_UNSELECT_ALL = Tout d\u00e9s\u00e9lectionner
-IDENTITY_MANAGEMENT_USER_DELETED = Compte supprim\u00E9
+IDENTITY_MANAGEMENT_USER_DELETED = Compte supprim\u00e9
IDENTITY_MANAGEMENT_USER_MANAGEMENT = Gestion des utilisateurs
IDENTITY_MSNM = Identifiant MSN
-IDENTITY_NOT_LOGGED_IN = Vous n'\u00EAtes pas connect\u00E9.
+IDENTITY_NOT_LOGGED_IN = Vous n'\u00eates pas connect\u00e9.
-IDENTITY_OCCUPATION = M\u00E9tier
+IDENTITY_OCCUPATION = M\u00e9tier
IDENTITY_PASSWORD = Mot de passe
@@ -217,33 +217,33 @@
IDENTITY_REGISTER_PASSWORD_CONFIRM = Confirmation de mot de passe
-IDENTITY_REGISTER_PENDING_TITLE = Un courriel a \u00E9t\u00E9 envoy\u00E9 \u00E0 l'adresse indiqu\u00E9e afin de confirmer votre enregistrement.
+IDENTITY_REGISTER_PENDING_TITLE = Un courriel a \u00e9t\u00e9 envoy\u00e9 \u00e0 l'adresse indiqu\u00e9e afin de confirmer votre enregistrement.
IDENTITY_REGISTER_REQUIRED_INFORMATION = indique un champ obligatoire
IDENTITY_REGISTER_STATUS_TITLE = Statut d'enregistrement
-IDENTITY_REGISTER_SUCCESS_TITLE = Votre compte a \u00E9t\u00E9 cr\u00E9\u00E9 avec succ\u00E8s. Vous pouvez vous connecter.
+IDENTITY_REGISTER_SUCCESS_TITLE = Votre compte a \u00e9t\u00e9 cr\u00e9\u00e9 avec succ\u00e8s. Vous pouvez vous connecter.
-IDENTITY_REGISTER_TITLE = Informations g\u00E9n\u00E9rales
+IDENTITY_REGISTER_TITLE = Informations g\u00e9n\u00e9rales
IDENTITY_REGISTER_TITLE_CONFIRM = Confirmation
IDENTITY_REGISTER_TITLE_CONFIRM_DELETE = Confirmation : supprimer
-IDENTITY_REGISTER_VERIFY_CAPTCHA = V\u00E9rification visuelle
+IDENTITY_REGISTER_VERIFY_CAPTCHA = V\u00e9rification visuelle
-IDENTITY_REGISTRATION_DATE = Enregistr\u00E9 le
+IDENTITY_REGISTRATION_DATE = Enregistr\u00e9 le
-IDENTITY_SECURITY_ANSWER = R\u00E9ponse \u00E0 votre question de s\u00E9curit\u00E9
+IDENTITY_SECURITY_ANSWER = R\u00e9ponse \u00e0 votre question de s\u00e9curit\u00e9
-IDENTITY_SECURITY_QUESTION = Question de s\u00E9curit\u00E9
+IDENTITY_SECURITY_QUESTION = Question de s\u00e9curit\u00e9
IDENTITY_SIGNATURE = Signature
-IDENTITY_SKYPE = Num\u00E9ro Skype
+IDENTITY_SKYPE = Num\u00e9ro Skype
-IDENTITY_THEME = Th\u00E8me
+IDENTITY_THEME = Th\u00e8me
IDENTITY_TIMEZONE = Fuseau horaire
@@ -253,7 +253,7 @@
IDENTITY_VALIDATION_ERROR_INVALID_EMAIL = Adresse de courriel invalide.
-IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD = Mot de passe erron\u00E9.
+IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD = Mot de passe erron\u00e9.
IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH = Vos mots de passe ne correspondent pas.
@@ -263,7 +263,7 @@
IDENTITY_VALIDATION_ERROR_USERNAME_ERROR = Erreur lors de la validation du nom d'utilisateur.
-IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN = Ce nom d'utilisateur est d\u00E9j\u00E0 utilis\u00E9.
+IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN = Ce nom d'utilisateur est d\u00e9j\u00e0 utilis\u00e9.
IDENTITY_VERIFICATION_LOGIN = Connexion
@@ -273,17 +273,17 @@
IDENTITY_VERIFICATION_STATUS_FAILED = Impossible de valider cette adresse de courriel.
-IDENTITY_VERIFICATION_STATUS_REGISTER_APPROVAL = Votre adresse de courriel a \u00E9t\u00E9 v\u00E9rifi\u00E9e, mais votre compte doit \u00EAtre approuv\u00E9 par un administrateur.
+IDENTITY_VERIFICATION_STATUS_REGISTER_APPROVAL = Votre adresse de courriel a \u00e9t\u00e9 v\u00e9rifi\u00e9e, mais votre compte doit \u00eatre approuv\u00e9 par un administrateur.
-IDENTITY_VERIFICATION_STATUS_REGISTER_CUSTOM = Votre compte a \u00E9t\u00E9 activ\u00E9. Vous pouvez vous connecter.
+IDENTITY_VERIFICATION_STATUS_REGISTER_CUSTOM = Votre compte a \u00e9t\u00e9 activ\u00e9. Vous pouvez vous connecter.
-IDENTITY_VERIFICATION_STATUS_REGISTER_SUCCESS = Votre compte a \u00E9t\u00E9 activ\u00E9. Vous pouvez vous connecter.
+IDENTITY_VERIFICATION_STATUS_REGISTER_SUCCESS = Votre compte a \u00e9t\u00e9 activ\u00e9. Vous pouvez vous connecter.
-IDENTITY_VERIFICATION_STATUS_VALIDATED = Adresse de courriel valid\u00E9e.
+IDENTITY_VERIFICATION_STATUS_VALIDATED = Adresse de courriel valid\u00e9e.
IDENTITY_VIEW_PROFILE_TITLE = Voir mon profil
-IDENTITY_WARNING_CONFIRM_DELETE_ROLE = Attention ! Vous allez supprimer le r\u00F4le
+IDENTITY_WARNING_CONFIRM_DELETE_ROLE = Attention ! Vous allez supprimer le r\u00f4le
IDENTITY_WARNING_CONFIRM_DELETE_USER = Attention ! Vous allez supprimer le compte
@@ -295,3 +295,7 @@
javax.portlet.title=Utilisateur
javax.faces.component.UIInput.REQUIRED=Valeur requise
+
+ROLE_TYPE=r\u00f4le
+DUPLICATE_ERROR=Un {1} nomm\u00e9 ''{0}'' existe d\u00e9j\u00e0!
+INVALID_NAME_ERROR=''{0}'' est un nom invalide pour un {1} : Ne peut pas \u00eatre null, vide ou contenir '\\', '<', '>', '(', ')', '=' ou '%5c'
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_it.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_it.properties 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_it.properties 2009-05-15 12:10:05 UTC (rev 13376)
@@ -116,7 +116,6 @@
IDENTITY_MANAGEMENT_ROLE_ASSIGNED=Ruoli assegnati
IDENTITY_MANAGEMENT_CREATE_ROLE=Crea un nuovo ruolo
IDENTITY_MANAGEMENT_EDIT_ROLE=Modifica il ruolo
-IDENTITY_MANAGEMENT_CREATE_ROLE=Crea il ruolo
IDENTITY_MANAGEMENT_DISABLE=Disabilita
IDENTITY_MANAGEMENT_DISABLE_USER_DISABLED=Utente disabilitato
IDENTITY_MANAGEMENT_ENABLE=Abilita
@@ -171,8 +170,6 @@
IDENTITY_VALIDATION_ERROR_REGISTRATION=Fallita la registrazione dell'utente.
IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN=Il nome utente esiste gi\u00e0.
IDENTITY_VALIDATION_ERROR_USERNAME_ERROR=Errore durante la validazione del nome utente.
-IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN=Il nome del ruolo esiste gi\u00e0.
-IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR=Errore durante la validazione del nome del ruolo.
IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH=Le passwords non coincidono.
IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR=Errore durante la validazione della password.
IDENTITY_VALIDATION_ERROR_INVALID_EMAIL=Indirizzo e-mail non valido.
@@ -187,3 +184,7 @@
javax.portlet.keywords=amministrazione,utente
javax.faces.component.UIInput.REQUIRED=Il valore \u00e8 richiesto
+
+ROLE_TYPE=ruolo
+INVALID_NAME_ERROR=''{0}'' non \u00e8 un nome valido di {1} : Non \u00f2 essere null, vuoto o contenere '\\', '<', '>', '(', ')', '=' o '%5c'
+DUPLICATE_ERROR=Un valore {1} con nome ''{0}'' esiste gi\u00e0!
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ja.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ja.properties 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ja.properties 2009-05-15 12:10:05 UTC (rev 13376)
@@ -114,7 +114,6 @@
IDENTITY_MANAGEMENT_ROLE_ASSIGNED=\u30a2\u30b5\u30a4\u30f3\u30ed\u30fc\u30eb
IDENTITY_MANAGEMENT_CREATE_ROLE=\u65b0\u3057\u3044\u30ed\u30fc\u30eb\u306e\u4f5c\u6210
IDENTITY_MANAGEMENT_EDIT_ROLE=\u30ed\u30fc\u30eb\u306e\u7de8\u96c6
-IDENTITY_MANAGEMENT_CREATE_ROLE=\u30ed\u30fc\u30eb\u306e\u4f5c\u6210
IDENTITY_MANAGEMENT_DISABLE=\u7121\u52b9
IDENTITY_MANAGEMENT_DISABLE_USER_DISABLED=\u7121\u52b9\u306b\u306a\u3063\u305f\u30e6\u30fc\u30b6
IDENTITY_MANAGEMENT_ENABLE=\u6709\u52b9
@@ -169,8 +168,6 @@
IDENTITY_VALIDATION_ERROR_REGISTRATION=\u30e6\u30fc\u30b6\u306e\u767b\u9332\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002
IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN=\u3053\u306e\u30e6\u30fc\u30b6\u540d\u306f\u65e2\u306b\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002
IDENTITY_VALIDATION_ERROR_USERNAME_ERROR=\u30e6\u30fc\u30b6\u540d\u306e\u30a8\u30e9\u30fc\u3002
-IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN=\u3053\u306e\u30ed\u30fc\u30eb\u540d\u306f\u65e2\u306b\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059.
-IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR=\u30ed\u30fc\u30eb\u59ea\u306e\u30a8\u30e9\u30fc\u3002
IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH=\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u4e00\u81f4\u3057\u307e\u305b\u3093\u3002
IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR=\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30a8\u30e9\u30fc\u3002
IDENTITY_VALIDATION_ERROR_INVALID_EMAIL=\u7121\u52b9\u306aE\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3067\u3059\u3002
@@ -185,3 +182,5 @@
javax.portlet.keywords=\u7ba1\u7406,\u30e6\u30fc\u30b6
javax.faces.component.UIInput.REQUIRED=\u5fc5\u9808\u5024\u3067\u3059
+
+ROLE_TYPE=\u30ed\u30fc\u30eb\u306e
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_pt_BR.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_pt_BR.properties 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_pt_BR.properties 2009-05-15 12:10:05 UTC (rev 13376)
@@ -21,31 +21,31 @@
# 02110-1301 USA, or see the FSF site: http://www.fsf.org. #
################################################################################
-javax.faces.validator.LengthValidator.MINIMUM= Entrada \u00E9 muito curta (m\u00EDnimo de {0} caracteres).
+javax.faces.validator.LengthValidator.MINIMUM= Entrada \u00e9 muito curta (m\u00ednimo de {0} caracteres).
-IDENTITY_APPLICATION_NOT_AVAILABLE=Porlet n\u00E3o dispon\u00EDvel. Verifique sua configura\u00E7\u00E3o e log de erro para mais informa\u00E7\u00F5es.
+IDENTITY_APPLICATION_NOT_AVAILABLE=Porlet n\u00e3o dispon\u00edvel. Verifique sua configura\u00e7\u00e3o e log de erro para mais informa\u00e7\u00f5es.
IDENTITY_WELCOME=Bem-vindo
IDENTITY_REGISTER=Registrar-se
IDENTITY_LOST_PASSWORD=Esqueceu Senha
-IDENTITY_NOT_LOGGED_IN=Voc\u00EA n\u00E3o est\u00E1 autenticado no portal.
-IDENTITY_CREATE_ACCOUNT=Voc\u00EA pode criar uma conta.
+IDENTITY_NOT_LOGGED_IN=Voc\u00ea n\u00e3o est\u00e1 autenticado no portal.
+IDENTITY_CREATE_ACCOUNT=Voc\u00ea pode criar uma conta.
IDENTITY_BUTTON_SUBMIT=Enviar
IDENTITY_BUTTON_EDIT=Editar
IDENTITY_BUTTON_CANCEL=Cancelar
-IDENTITY_REGISTER_TITLE=Informa\u00E7\u00F5es b\u00E1sicas do usu\u00E1rio
-IDENTITY_REGISTER_TITLE_CONFIRM=Confirma\u00E7\u00E3o
+IDENTITY_REGISTER_TITLE=Informa\u00e7\u00f5es b\u00e1sicas do usu\u00e1rio
+IDENTITY_REGISTER_TITLE_CONFIRM=Confirma\u00e7\u00e3o
IDENTITY_REGISTER_PASSWORD_CONFIRM=Confirme a Senha
IDENTITY_REGISTER_STATUS_TITLE=Status do registro
-IDENTITY_REGISTER_SUCCESS_TITLE=Sua conta foi criada com \u00EAxito. Voc\u00EA pode autenticar-se agora.
-IDENTITY_REGISTER_PENDING_TITLE=Um e-mail foi enviado ao seu endere\u00E7o de e-mail para confirmar o seu registro.
-IDENTITY_REGISTER_REQUIRED_INFORMATION=indica um campo obrigat\u00F3rio.
+IDENTITY_REGISTER_SUCCESS_TITLE=Sua conta foi criada com \u00eaxito. Voc\u00ea pode autenticar-se agora.
+IDENTITY_REGISTER_PENDING_TITLE=Um e-mail foi enviado ao seu endere\u00e7o de e-mail para confirmar o seu registro.
+IDENTITY_REGISTER_REQUIRED_INFORMATION=indica um campo obrigat\u00f3rio.
IDENTITY_LOST_PASSWORD_TITLE=Esqueceu seu dados de login?
-IDENTITY_LOST_PASSWORD_DESCRIPTION=Digite seu usu\u00E1rio para redefinir sua senha.
-IDENTITY_LOST_PASSWORD_ERROR=Falha na redefini\u00E7\u00E3o de senha.
-IDENTITY_LOST_PASSWORD_STATUS_SUCCESSFUL=Voc\u00EA receber\u00E1 um e-mail com sua nova senha.
+IDENTITY_LOST_PASSWORD_DESCRIPTION=Digite seu usu\u00e1rio para redefinir sua senha.
+IDENTITY_LOST_PASSWORD_ERROR=Falha na redefini\u00e7\u00e3o de senha.
+IDENTITY_LOST_PASSWORD_STATUS_SUCCESSFUL=Voc\u00ea receber\u00e1 um e-mail com sua nova senha.
IDENTITY_LOST_PASSWORD_STATUS_404=Nenhuma conta encontrada.
IDENTITY_LOST_PASSWORD_STATUS_TITLE=Esqueceu senha
@@ -53,27 +53,27 @@
IDENTITY_EDIT_PASSWORD_TITLE=Altere a sua senha
IDENTITY_EDIT_PASSWORD_CURRENT=Senha atual
IDENTITY_EDIT_CHANGE_PASSWORD=Alterar senha
-IDENTITY_EDIT_CHANGE_PASSWORD_ERROR=N\u00E3o foi poss\u00EDvel alterar a senha.
+IDENTITY_EDIT_CHANGE_PASSWORD_ERROR=N\u00e3o foi poss\u00edvel alterar a senha.
IDENTITY_EDIT_CHANGE_PASSWOR_STATUS=A senha foi atualizada.
-IDENTITY_EDIT_EMAIL_TITLE=Alterar o seu endere\u00E7o de e-mail
-IDENTITY_EDIT_EMAIL_NEW=Novo endere\u00E7o de e-mail
+IDENTITY_EDIT_EMAIL_TITLE=Alterar o seu endere\u00e7o de e-mail
+IDENTITY_EDIT_EMAIL_NEW=Novo endere\u00e7o de e-mail
IDENTITY_EDIT_CHANGE_EMAIL=Alterar e-mail
-IDENTITY_EDIT_CHANGE_EMAIL_ERROR=N\u00E3o foi poss\u00EDvel alterar o endere\u00E7o de e-mail
-IDENTITY_EDIT_CHANGE_EMAIL_STATUS_PENDING=Uma valida\u00E7\u00E3o de e-mail foi enviada ao seu endere\u00E7o.
-IDENTITY_EDIT_CHANGE_EMAIL_STATUS_CHANGED=Seu endere\u00E7o de e-mail foi alterado.
+IDENTITY_EDIT_CHANGE_EMAIL_ERROR=N\u00e3o foi poss\u00edvel alterar o endere\u00e7o de e-mail
+IDENTITY_EDIT_CHANGE_EMAIL_STATUS_PENDING=Uma valida\u00e7\u00e3o de e-mail foi enviada ao seu endere\u00e7o.
+IDENTITY_EDIT_CHANGE_EMAIL_STATUS_CHANGED=Seu endere\u00e7o de e-mail foi alterado.
IDENTITY_EDIT_PROFILE_TITLE=Editar perfil
IDENTITY_VIEW_PROFILE_TITLE=Visualizar perfil
-IDENTITY_USERNAME=Usu\u00E1rio
+IDENTITY_USERNAME=Usu\u00e1rio
IDENTITY_PASSWORD=Senha
IDENTITY_EMAIL=E-Mail
IDENTITY_GIVENNAME=Primeiro nome
-IDENTITY_FAMILYNAME=\u00DAltimo nome
+IDENTITY_FAMILYNAME=\u00daltimo nome
IDENTITY_SKYPE=Identificador Skype
IDENTITY_LOCATION=Local
-IDENTITY_OCCUPATION=Ocupa\u00E7\u00E3o
+IDENTITY_OCCUPATION=Ocupa\u00e7\u00e3o
IDENTITY_EXTRA=Adicional
IDENTITY_SIGNATURE=Assinatura
IDENTITY_INTERESTS=Interesses
@@ -83,49 +83,49 @@
IDENTITY_MSNM=Identificador MSN messenger
IDENTITY_YIM=Identificador Yahoo
IDENTITY_XMMP=Identificador Xmmp
-IDENTITY_HOMEPAGE=P\u00E1gina inicial
-IDENTITY_TIMEZONE=Fuso hor\u00E1rio
+IDENTITY_HOMEPAGE=P\u00e1gina inicial
+IDENTITY_TIMEZONE=Fuso hor\u00e1rio
IDENTITY_THEME=Tema
-IDENTITY_SECURITY_QUESTION=Pergunta de seguran\u00E7a
-IDENTITY_SECURITY_ANSWER=Resposta de seguran\u00E7a
-IDENTITY_LAST_LOGIN=\u00DAltimo acesso
+IDENTITY_SECURITY_QUESTION=Pergunta de seguran\u00e7a
+IDENTITY_SECURITY_ANSWER=Resposta de seguran\u00e7a
+IDENTITY_LAST_LOGIN=\u00daltimo acesso
IDENTITY_REIGSTRATION_DATE=Data de Registro
IDENTITY_ENABLED=Ativado
-IDENTITY_CATEGORY_GENERAL=Prefer\u00EAncias Gerais
-IDENTITY_CATEGORY_PERSONAL=Informa\u00E7\u00F5es Pessoais
-IDENTITY_CATEGORY_INSTANT=Identidades de Mensagens Instant\u00E2neas
-IDENTITY_CATEGORY_ADDITIONAL=Informa\u00E7\u00F5es Adicionais
+IDENTITY_CATEGORY_GENERAL=Prefer\u00eancias Gerais
+IDENTITY_CATEGORY_PERSONAL=Informa\u00e7\u00f5es Pessoais
+IDENTITY_CATEGORY_INSTANT=Identidades de Mensagens Instant\u00e2neas
+IDENTITY_CATEGORY_ADDITIONAL=Informa\u00e7\u00f5es Adicionais
-IDENTITY_CATEGORY_ADDITIONAL_SIGNATURE=(Assinatura de ,no m\u00E1ximo, 255 caracteres)
-IDENTITY_CATEGORY_ADDITIONAL_EXTRA=(m\u00E1ximo de 255 caracteres)
+IDENTITY_CATEGORY_ADDITIONAL_SIGNATURE=(Assinatura de ,no m\u00e1ximo, 255 caracteres)
+IDENTITY_CATEGORY_ADDITIONAL_EXTRA=(m\u00e1ximo de 255 caracteres)
-IDENTITY_MANAGEMENT_ACTION=A\u00E7\u00F5es
-IDENTITY_MANAGEMENT_ACTION_EDIT_PROFILE=Editar usu\u00E1rio
+IDENTITY_MANAGEMENT_ACTION=A\u00e7\u00f5es
+IDENTITY_MANAGEMENT_ACTION_EDIT_PROFILE=Editar usu\u00e1rio
IDENTITY_MANAGEMENT_ACTION_ROLES=Perfis
IDENTITY_MANAGEMENT_ACTION_DELETE=Excluir
-IDENTITY_MANAGEMENT_USER_MANAGEMENT=Gerenciamento de usu\u00E1rios
+IDENTITY_MANAGEMENT_USER_MANAGEMENT=Gerenciamento de usu\u00e1rios
IDENTITY_MANAGEMENT_ROLE_MANAGEMENT=Gerenciamento de perfis
-IDENTITY_MANAGEMENT_SEARCH_USER=Pesquisar usu\u00E1rios
-IDENTITY_MANAGEMENT_CREATE_USER=Criar uma nova conta de usu\u00E1rio
-IDENTITY_MANAGEMENT_CREATE_USER_CREATED=Usu\u00E1rio criado
-IDENTITY_MANAGEMENT_USER_DELETED=Usu\u00E1rio exclu\u00EDdo
+IDENTITY_MANAGEMENT_SEARCH_USER=Pesquisar usu\u00e1rios
+IDENTITY_MANAGEMENT_CREATE_USER=Criar uma nova conta de usu\u00e1rio
+IDENTITY_MANAGEMENT_CREATE_USER_CREATED=Usu\u00e1rio criado
+IDENTITY_MANAGEMENT_USER_DELETED=Usu\u00e1rio exclu\u00eddo
IDENTITY_MANAGEMENT_ROLE=Perfil
-IDENTITY_MANAGEMENT_ROLE_DISPLAY=Nome de exibi\u00E7\u00E3o
-IDENTITY_MANAGEMENT_ROLE_MEMBERS=Usu\u00E1rios
-IDENTITY_MANAGEMENT_ROLE_ASSIGNED=Perfis atribu\u00EDdos
+IDENTITY_MANAGEMENT_ROLE_DISPLAY=Nome de exibi\u00e7\u00e3o
+IDENTITY_MANAGEMENT_ROLE_MEMBERS=Usu\u00e1rios
+IDENTITY_MANAGEMENT_ROLE_ASSIGNED=Perfis atribu\u00eddos
IDENTITY_MANAGEMENT_CREATE_ROLE=Criar perfil
IDENTITY_MANAGEMENT_EDIT_ROLE=Editar perfil
IDENTITY_MANAGEMENT_DISABLE=Desabilitar
IDENTITY_MANAGEMENT_DISABLE_USER_DISABLED=Usua\u0155io desabilitado
IDENTITY_MANAGEMENT_ENABLE=Habilitar
-IDENTITY_MANAGEMENT_ENABLE_USER_ENABLED=Usu\u00E1rio habilitado
+IDENTITY_MANAGEMENT_ENABLE_USER_ENABLED=Usu\u00e1rio habilitado
IDENTITY_MANAGEMENT_RESET_PASSWORD=Redefinir senha
-IDENTITY_MANAGEMENT_RESET_PASSWORD_FOR_USER=Redefinir senha para o usu\u00E1rio
-IDENTITY_MANAGEMENT_RESET_PASSWORD_DESCRIPTION=O usu\u00E1rio receber\u00E1 uma senha aleat\u00F3ria enviada ao seu endere\u00E7o de e-mail.
+IDENTITY_MANAGEMENT_RESET_PASSWORD_FOR_USER=Redefinir senha para o usu\u00e1rio
+IDENTITY_MANAGEMENT_RESET_PASSWORD_DESCRIPTION=O usu\u00e1rio receber\u00e1 uma senha aleat\u00f3ria enviada ao seu endere\u00e7o de e-mail.
IDENTITY_MANAGEMENT_ASSIGN_ROLES=Atribuir perfis
-IDENTITY_MANAGEMENT_COUNT_PENDING_USERS=Usu\u00E1rios pendentes
-IDENTITY_MANAGEMENT_COUNT_REGISTERED_USERS=Usu\u00E1rios registrados
+IDENTITY_MANAGEMENT_COUNT_PENDING_USERS=Usu\u00e1rios pendentes
+IDENTITY_MANAGEMENT_COUNT_REGISTERED_USERS=Usu\u00e1rios registrados
IDENTITY_MANAGEMENT_APPROVE_ALL=Aprovar selecionados
IDENTITY_MANAGEMENT_REJECT_ALL=Rejeitar selecionados
IDENTITY_MANAGEMENT_SELECT_ALL=Selecionar todos
@@ -141,48 +141,50 @@
IDENTITY_MANAGEMENT_SUBSCRIPTION_MODE=Modo de assinatura
IDENTITY_MANAGEMENT_SUBSCRIPTION_ADMIN_MODE=Administrador Modo de assinatura
IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_CUSTOM=Modo de assinatura personalizado.
-IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_AUTOMATIC=Autom\u00E1tica - nenhuma valida\u00E7\u00E3o de e-mail, nenhuma aprova\u00E7\u00E3o do administrador.
-IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL=Valida\u00E7\u00E3o de e-mail, nenhuma aprova\u00E7\u00E3o do administrador.
-IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL_ADMIN=Valida\u00E7\u00E3o de e-mail, e aprova\u00E7\u00E3o do administrador.
+IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_AUTOMATIC=Autom\u00e1tica - nenhuma valida\u00e7\u00e3o de e-mail, nenhuma aprova\u00e7\u00e3o do administrador.
+IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL=Valida\u00e7\u00e3o de e-mail, nenhuma aprova\u00e7\u00e3o do administrador.
+IDENTITY_MANAGEMENT_DESCRIPTION_SUBSCRIPTION_EMAIL_ADMIN=Valida\u00e7\u00e3o de e-mail, e aprova\u00e7\u00e3o do administrador.
-IDENTITY_REGISTER_VERIFY_CAPTCHA=Digite a imagem de seguran\u00E7a
-IDENTITY_REGISTER_TITLE_CONFIRM_DELETE=Confirma\u00E7\u00E3o\: Excluir
-IDENTITY_WARNING_CONFIRM_DELETE_USER=Aten\u00E7\u00E3o\! Deseja excluir o usu\u00E1rio
-IDENTITY_WARNING_CONFIRM_DELETE_ROLE=Aten\u00E7\u00E3o\! Deseja excluir o perfil
-IDENTITY_REGISTER_CONFIRMATIONEMAIL=Confirme a sua inscri\u00E7\u00E3o
+IDENTITY_REGISTER_VERIFY_CAPTCHA=Digite a imagem de seguran\u00e7a
+IDENTITY_REGISTER_TITLE_CONFIRM_DELETE=Confirma\u00e7\u00e3o\: Excluir
+IDENTITY_WARNING_CONFIRM_DELETE_USER=Aten\u00e7\u00e3o\! Deseja excluir o usu\u00e1rio
+IDENTITY_WARNING_CONFIRM_DELETE_ROLE=Aten\u00e7\u00e3o\! Deseja excluir o perfil
+IDENTITY_REGISTER_CONFIRMATIONEMAIL=Confirme a sua inscri\u00e7\u00e3o
IDENTITY_MAIL_SUBJECT_LOST_PASSWORD=Redefinir a sua senha
-IDENTITY_MAIL_SUBJECT_REGISTER=Confirmar inscri\u00E7\u00E3o
-IDENTITY_MAIL_SUBJECT_CHANGE_EMAIL=Confirmar endere\u00E7o de e-mail
+IDENTITY_MAIL_SUBJECT_REGISTER=Confirmar inscri\u00e7\u00e3o
+IDENTITY_MAIL_SUBJECT_CHANGE_EMAIL=Confirmar endere\u00e7o de e-mail
-IDENTITY_MANAGEMENT_ERROR_ACTION_ROLE=N\u00E3o foi poss\u00EDvel executar a a\u00E7\u00E3o nesse perfil. Por favor, verifique o arquivo de log para mais informa\u00E7\u00F5es.
-IDENTITY_MANAGEMENT_ERROR_ACTION_USER=N\u00E3o foi poss\u00EDvel executar a a\u00E7\u00E3o nesse usu\u00E1rio. Por favor, verifique o arquivo de log para mais informa\u00E7\u00F5es.
+IDENTITY_MANAGEMENT_ERROR_ACTION_ROLE=N\u00e3o foi poss\u00edvel executar a a\u00e7\u00e3o nesse perfil. Por favor, verifique o arquivo de log para mais informa\u00e7\u00f5es.
+IDENTITY_MANAGEMENT_ERROR_ACTION_USER=N\u00e3o foi poss\u00edvel executar a a\u00e7\u00e3o nesse usu\u00e1rio. Por favor, verifique o arquivo de log para mais informa\u00e7\u00f5es.
IDENTITY_VERIFICATION_RETURN=Voltar ao portal
IDENTITY_VERIFICATION_LOGIN=Entrar
-IDENTITY_VERIFICATION_STATUS_EROOR=Erro durante a valida\u00E7\u00E3o de endere\u00E7o de e-mail.
-IDENTITY_VERIFICATION_STATUS_FAILED=N\u00E3o \u00E9 poss\u00EDvel validar o endere\u00E7o de e-mail.
+IDENTITY_VERIFICATION_STATUS_EROOR=Erro durante a valida\u00e7\u00e3o de endere\u00e7o de e-mail.
+IDENTITY_VERIFICATION_STATUS_FAILED=N\u00e3o \u00e9 poss\u00edvel validar o endere\u00e7o de e-mail.
IDENTITY_VERIFICATION_STATUS_VALIDATED=E-mail validado.
-IDENTITY_VERIFICATION_STATUS_REGISTER_SUCCESS=Sua conta foi ativada. Voc\u00EA poder\u00E1 entrar agora.
-IDENTITY_VERIFICATION_STATUS_REGISTER_APPROVAL=Seu endere\u00E7o de e-mail foi validado, mas sua conta precisa ser aprovada pelo administrador.
-IDENTITY_VERIFICATION_STATUS_REGISTER_CUSTOM=Sua conta foi ativada. Voc\u00EA poder\u00E1 entrar agora.
+IDENTITY_VERIFICATION_STATUS_REGISTER_SUCCESS=Sua conta foi ativada. Voc\u00ea poder\u00e1 entrar agora.
+IDENTITY_VERIFICATION_STATUS_REGISTER_APPROVAL=Seu endere\u00e7o de e-mail foi validado, mas sua conta precisa ser aprovada pelo administrador.
+IDENTITY_VERIFICATION_STATUS_REGISTER_CUSTOM=Sua conta foi ativada. Voc\u00ea poder\u00e1 entrar agora.
-IDENTITY_VALIDATION_ERROR_REGISTRATION=Falha no registro do usu\u00E1rio.
-IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN=Esse usu\u00E1rio j\u00E1 est\u00E1 em uso.
-IDENTITY_VALIDATION_ERROR_USERNAME_ERROR=Erro ao validar o usu\u00E1rio.
-IDENTITY_VALIDATION_ERROR_ROLENAME_TAKEN=Esse perfil j\u00E1 est\u00E1 em uso.
-IDENTITY_VALIDATION_ERROR_ROLENAME_ERROR=Erro ao validar o nome do perfil.
-IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH=As senhas n\u00E3o conferem.
-IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR=Erro durante a valida\u00E7\u00E3o de senha.
-IDENTITY_VALIDATION_ERROR_INVALID_EMAIL=E-mail inv\u00E1lido.
-IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD=Senha inv\u00E1lida
-IDENTITY_VALIDATION_ERROR_CAPTCHA_INCORRECT=Imagem de seguran\u00E7a inv\u00E1lida
+IDENTITY_VALIDATION_ERROR_REGISTRATION=Falha no registro do usu\u00e1rio.
+IDENTITY_VALIDATION_ERROR_USERNAME_TAKEN=Esse usu\u00e1rio j\u00e1 est\u00e1 em uso.
+IDENTITY_VALIDATION_ERROR_USERNAME_ERROR=Erro ao validar o usu\u00e1rio.
+IDENTITY_VALIDATION_ERROR_PASSWORD_DOESNT_MATCH=As senhas n\u00e3o conferem.
+IDENTITY_VALIDATION_ERROR_PASSWORD_ERROR=Erro durante a valida\u00e7\u00e3o de senha.
+IDENTITY_VALIDATION_ERROR_INVALID_EMAIL=E-mail inv\u00e1lido.
+IDENTITY_VALIDATION_ERROR_INVALID_PASSWORD=Senha inv\u00e1lida
+IDENTITY_VALIDATION_ERROR_CAPTCHA_INCORRECT=Imagem de seguran\u00e7a inv\u00e1lida
# Example usage for dynamic values
IDENTITY_DYNAMIC_VALUE_TEST=test label
IDENTITY_DYNAMIC_VALUE_TEST2=test label2
-javax.portlet.title=Perfil do Usu\u00E1rio
+javax.portlet.title=Perfil do Usu\u00e1rio
javax.portlet.keywords=management,user
-javax.faces.component.UIInput.REQUIRED=Valor obrigat\u00F3rio
\ No newline at end of file
+javax.faces.component.UIInput.REQUIRED=Valor obrigat\u00f3rio
+
+ROLE_TYPE=perfil
+INVALID_NAME_ERROR=''{0}'' \u00e9 um nome inv\u00e1lido para {1}\: n\u00e3o deve ser nulo, vazio ou conter os caracteres '\\', '<', '>', '(', ')', '=' ou '%5c'
+DUPLICATE_ERROR=Um {1} denominado ''{0}'' j\u00e1 existe\!
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ru.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ru.properties 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/bundles/Identity_ru.properties 2009-05-15 12:10:05 UTC (rev 13376)
@@ -114,7 +114,6 @@
IDENTITY_MANAGEMENT_ROLE_ASSIGNED=\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u0440\u043e\u043b\u0438
IDENTITY_MANAGEMENT_CREATE_ROLE=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0440\u043e\u043b\u044c
IDENTITY_MANAGEMENT_EDIT_ROLE=\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u043e\u043b\u044c
-IDENTITY_MANAGEMENT_CREATE_ROLE=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u043e\u043b\u044c
IDENTITY_MANAGEMENT_DISABLE=\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c
IDENTITY_MANAGEMENT_ENABLE=\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c
IDENTITY_MANAGEMENT_RESET_PASSWORD=\u0421\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c
@@ -176,3 +175,5 @@
# Example usage for dynamic values
IDENTITY_DYNAMIC_VALUE_TEST=test label
IDENTITY_DYNAMIC_VALUE_TEST2=test label2
+
+ROLE_TYPE=\u0440\u043e\u043b\u044c
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/WEB-INF/faces-config.xml 2009-05-15 12:10:05 UTC (rev 13376)
@@ -30,9 +30,9 @@
<application>
<variable-resolver>org.jboss.portal.core.identity.ui.faces.PortletVariableResolver</variable-resolver>
- <property-resolver>org.jboss.portal.core.identity.ui.faces.PortletDelegatingPropertyResolver</property-resolver>
+ <property-resolver>org.jboss.portal.core.identity.ui.faces.PortletDelegatingPropertyResolver</property-resolver>
<view-handler>
- org.jboss.portletbridge.application.PortletViewHandler
+ org.jboss.portletbridge.application.PortletViewHandler
</view-handler>
<state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
<locale-config>
@@ -45,459 +45,476 @@
</locale-config>
<message-bundle>conf.bundles.Identity</message-bundle>
</application>
-
- <managed-bean>
- <managed-bean-name>configurationbean</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.common.ConfigurationBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- <managed-property>
- <property-name>identityUIConfigurationService</property-name>
- <value>#{applicationScope.IdentityUIConfigurationService}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>metadataservice</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.common.MetaDataServiceBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>identityrolemgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.common.IdentityRoleBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- <managed-property>
- <property-name>roleModule</property-name>
- <value>#{applicationScope.RoleModule}</value>
- </managed-property>
- <managed-property>
- <property-name>membershipModule</property-name>
- <value>#{applicationScope.MembershipModule}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>identityusermgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.common.IdentityUserBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
- <managed-property>
- <property-name>userModule</property-name>
- <value>#{applicationScope.UserModule}</value>
- </managed-property>
- <managed-property>
- <property-name>userProfileModule</property-name>
- <value>#{applicationScope.UserProfileModule}</value>
- </managed-property>
- <managed-property>
- <property-name>metaDataService</property-name>
- <value>#{metadataservice}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>editprofilemgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.EditProfileAction</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>identityUserBean</property-name>
- <value>#{identityusermgr}</value>
- </managed-property>
- <managed-property>
- <property-name>validateEmailService</property-name>
- <value>#{applicationScope.ValidateEmailService}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>userregistermgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.CreateUserAction</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>identityUserBean</property-name>
- <value>#{identityusermgr}</value>
- </managed-property>
- <managed-property>
- <property-name>defaultRoles</property-name>
- <value>#{configurationbean.configuration.defaultRoles}</value>
- </managed-property>
- <managed-property>
- <property-name>registrationService</property-name>
- <value>#{applicationScope.RegistrationService}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>assignrolemgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.AssignRoleAction</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>identityUserBean</property-name>
- <value>#{identityusermgr}</value>
- </managed-property>
- <managed-property>
- <property-name>identityRoleBean</property-name>
- <value>#{identityrolemgr}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>useradministrationbean</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.admin.UserAdministrationBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>subscriptionMode</property-name>
- <value>#{configurationbean.configuration.subscriptionMode}</value>
- </managed-property>
- <managed-property>
- <property-name>adminSubscriptionMode</property-name>
- <value>#{configurationbean.configuration.adminSubscriptionMode}</value>
- </managed-property>
- <managed-property>
- <property-name>identityUserBean</property-name>
- <value>#{identityusermgr}</value>
- </managed-property>
- <managed-property>
- <property-name>identityRoleBean</property-name>
- <value>#{identityrolemgr}</value>
- </managed-property>
- <managed-property>
- <property-name>registrationService</property-name>
- <value>#{applicationScope.RegistrationService}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>rolemanagementbean</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.admin.RoleManagementBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>identityRoleBean</property-name>
- <value>#{identityrolemgr}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>editrolemgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.EditRoleAction</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- <managed-property>
- <property-name>identityRoleBean</property-name>
- <value>#{identityrolemgr}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>lostpasswordmgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.LostPasswordAction</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>passwordCharacters</property-name>
- <value>#{configurationbean.configuration.passwordGenerationCharacters}</value>
- </managed-property>
- <managed-property>
- <property-name>identityUserBean</property-name>
- <value>#{identityusermgr}</value>
- </managed-property>
- <managed-property>
- <property-name>identityMailService</property-name>
- <value>#{applicationScope.IdentityMailService}</value>
- </managed-property>
- </managed-bean>
- <managed-bean>
- <managed-bean-name>createrolemgr</managed-bean-name>
- <managed-bean-class>org.jboss.portal.core.identity.ui.actions.CreateRoleAction</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>identityRoleBean</property-name>
- <value>#{identityrolemgr}</value>
- </managed-property>
- </managed-bean>
-
- <validator>
- <validator-id>EmailValidator</validator-id>
- <validator-class>org.jboss.portal.core.identity.ui.validators.EmailValidator</validator-class>
- </validator>
- <validator>
- <validator-id>UsernameValidator</validator-id>
- <validator-class>org.jboss.portal.core.identity.ui.validators.UsernameValidator</validator-class>
- </validator>
+ <!-- bean context for managed beans -->
+ <managed-bean>
+ <managed-bean-name>beanContext</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.faces.gui.JSFBeanContext</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>resourceName</property-name>
+ <value>conf.bundles.Identity</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>configurationbean</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.common.ConfigurationBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>identityUIConfigurationService</property-name>
+ <value>#{applicationScope.IdentityUIConfigurationService}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>metadataservice</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.common.MetaDataServiceBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>identityrolemgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.common.IdentityRoleBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>roleModule</property-name>
+ <value>#{applicationScope.RoleModule}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>membershipModule</property-name>
+ <value>#{applicationScope.MembershipModule}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>identityusermgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.common.IdentityUserBean</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <managed-property>
+ <property-name>userModule</property-name>
+ <value>#{applicationScope.UserModule}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>userProfileModule</property-name>
+ <value>#{applicationScope.UserProfileModule}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>metaDataService</property-name>
+ <value>#{metadataservice}</value>
+ </managed-property>
+ </managed-bean>
+
+ <managed-bean>
+ <managed-bean-name>editprofilemgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.actions.EditProfileAction</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>validateEmailService</property-name>
+ <value>#{applicationScope.ValidateEmailService}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>userregistermgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.actions.CreateUserAction</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>defaultRoles</property-name>
+ <value>#{configurationbean.configuration.defaultRoles}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>registrationService</property-name>
+ <value>#{applicationScope.RegistrationService}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>assignrolemgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.actions.AssignRoleAction</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>useradministrationbean</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.admin.UserAdministrationBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>subscriptionMode</property-name>
+ <value>#{configurationbean.configuration.subscriptionMode}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>adminSubscriptionMode</property-name>
+ <value>#{configurationbean.configuration.adminSubscriptionMode}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>registrationService</property-name>
+ <value>#{applicationScope.RegistrationService}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>rolemanagementbean</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.admin.RoleManagementBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>editrolemgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.actions.EditRoleAction</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>beanContext</property-name>
+ <property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>lostpasswordmgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.actions.LostPasswordAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>passwordCharacters</property-name>
+ <value>#{configurationbean.configuration.passwordGenerationCharacters}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>identityUserBean</property-name>
+ <value>#{identityusermgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>identityMailService</property-name>
+ <value>#{applicationScope.IdentityMailService}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>createrolemgr</managed-bean-name>
+ <managed-bean-class>org.jboss.portal.core.identity.ui.actions.CreateRoleAction</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>identityRoleBean</property-name>
+ <value>#{identityrolemgr}</value>
+ </managed-property>
+ <managed-property>
+ <property-name>beanContext</property-name>
+ <property-class>org.jboss.portal.faces.gui.BeanContext</property-class>
+ <value>#{beanContext}</value>
+ </managed-property>
+ </managed-bean>
+
<validator>
- <validator-id>RoleValidator</validator-id>
- <validator-class>org.jboss.portal.core.identity.ui.validators.RoleValidator</validator-class>
+ <validator-id>EmailValidator</validator-id>
+ <validator-class>org.jboss.portal.core.identity.ui.validators.EmailValidator</validator-class>
</validator>
- <validator>
- <validator-id>PasswordValidator</validator-id>
- <validator-class>org.jboss.portal.core.identity.ui.validators.PasswordValidator</validator-class>
- </validator>
- <validator>
- <validator-id>CurrentPasswordValidator</validator-id>
- <validator-class>org.jboss.portal.core.identity.ui.validators.CurrentPasswordValidator</validator-class>
- </validator>
- <validator>
- <validator-id>CaptchaValidator</validator-id>
- <validator-class>org.jboss.portal.core.identity.ui.validators.CaptchaValidator</validator-class>
- </validator>
-
- <navigation-rule>
- <navigation-case>
- <from-outcome>start</from-outcome>
- <to-view-id>/jsf/index.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <navigation-case>
- <from-outcome>lostPassword</from-outcome>
- <to-view-id>/jsf/lostPassword/lost.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/lostPassword/lost.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>status</from-outcome>
- <to-view-id>/jsf/lostPassword/status.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <navigation-case>
- <from-outcome>register</from-outcome>
- <to-view-id>/jsf/register/register.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/register/register.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>register</from-outcome>
- <to-view-id>/jsf/register/confirm.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/register/confirm.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>revise</from-outcome>
- <to-view-id>/jsf/register/register.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>registered</from-outcome>
- <to-view-id>/jsf/register/success.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <navigation-case>
- <from-outcome>changePassword</from-outcome>
- <to-view-id>/jsf/profile/changePassword.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/profile/changePassword.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>status</from-outcome>
- <to-view-id>/jsf/profile/viewProfile.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <navigation-case>
- <from-outcome>changeEmail</from-outcome>
- <to-view-id>/jsf/profile/changeEmail.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/profile/changeEmail.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>status</from-outcome>
- <to-view-id>/jsf/profile/viewProfile.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/index.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>editProfile</from-outcome>
- <to-view-id>/jsf/profile/editProfileRedirect.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/profile/*</from-view-id>
- <navigation-case>
- <from-outcome>editProfile</from-outcome>
- <to-view-id>/jsf/profile/editProfileRedirect.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
-
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-outcome>userAdmin</from-outcome>
- <to-view-id>/jsf/admin/index.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>start</from-outcome>
- <to-view-id>/jsf/admin/index.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-outcome>roleAdmin</from-outcome>
- <to-view-id>/jsf/admin/roles.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/index.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>createUser</from-outcome>
- <to-view-id>/jsf/admin/user/createUser.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-outcome>searchUsers</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/index.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>showPendingUsers</from-outcome>
- <to-view-id>/jsf/admin/user/pendingUsers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/pendingUsers.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>confirmPendingAction</from-outcome>
- <to-view-id>/jsf/admin/user/confirmPendingAction.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>cancel</from-outcome>
- <to-view-id>/jsf/admin/index.xthml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/confirmPendingAction.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>revise</from-outcome>
- <to-view-id>/jsf/admin/user/pendingUsers.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>success</from-outcome>
- <to-view-id>/jsf/admin/index.xthml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/searchUsers.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>deleteUser</from-outcome>
- <to-view-id>/jsf/admin/user/deleteUser.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/editProfile.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>adminChangePassword</from-outcome>
- <to-view-id>/jsf/admin/user/changePassword.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>start</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-outcome>start</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-action>#{editprofilemgr.adminEditProfile}</from-action>
- <from-outcome>editProfile</from-outcome>
- <to-view-id>/jsf/admin/editProfile.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/*</from-view-id>
- <navigation-case>
- <from-action>#{assignrolemgr.assignRoles}</from-action>
- <from-outcome>assignRoles</from-outcome>
- <to-view-id>/jsf/admin/assignRoles.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/createUser.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>register</from-outcome>
- <to-view-id>/jsf/admin/user/registerRoles.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/registerRoles.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>register</from-outcome>
- <to-view-id>/jsf/admin/user/registerConfirm.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/registerConfirm.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>revise</from-outcome>
- <to-view-id>/jsf/admin/user/createUser.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>registered</from-outcome>
- <to-view-id>/jsf/admin/index.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>createRole</from-outcome>
- <to-view-id>/jsf/admin/roles/createRole.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>editRole</from-outcome>
- <to-view-id>/jsf/admin/roles/editRole.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>viewMembers</from-outcome>
- <to-view-id>/jsf/admin/roles/roleMembers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>deleteRole</from-outcome>
- <to-view-id>/jsf/admin/roles/deleteRole.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/editProfile.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>resetPassword</from-outcome>
- <to-view-id>/jsf/admin/user/resetPassword.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/resetPassword.xhtml</from-view-id>
- <navigation-case>
- <from-action>#{lostpasswordmgr.doomed}</from-action>
- <from-outcome>status</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-action>#{lostpasswordmgr.doomed}</from-action>
- <from-outcome>lostPassword</from-outcome>
- <to-view-id>/jsf/admin/editProfile.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/jsf/admin/user/changePassword.xhtml</from-view-id>
- <navigation-case>
- <from-outcome>status</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>searchUsers</from-outcome>
- <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
- </navigation-case>
- </navigation-rule>
-
+ <validator>
+ <validator-id>UsernameValidator</validator-id>
+ <validator-class>org.jboss.portal.core.identity.ui.validators.UsernameValidator</validator-class>
+ </validator>
+ <validator>
+ <validator-id>PasswordValidator</validator-id>
+ <validator-class>org.jboss.portal.core.identity.ui.validators.PasswordValidator</validator-class>
+ </validator>
+ <validator>
+ <validator-id>CurrentPasswordValidator</validator-id>
+ <validator-class>org.jboss.portal.core.identity.ui.validators.CurrentPasswordValidator</validator-class>
+ </validator>
+ <validator>
+ <validator-id>CaptchaValidator</validator-id>
+ <validator-class>org.jboss.portal.core.identity.ui.validators.CaptchaValidator</validator-class>
+ </validator>
+
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/jsf/index.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>lostPassword</from-outcome>
+ <to-view-id>/jsf/lostPassword/lost.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/lostPassword/lost.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>status</from-outcome>
+ <to-view-id>/jsf/lostPassword/status.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>register</from-outcome>
+ <to-view-id>/jsf/register/register.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/register/register.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>register</from-outcome>
+ <to-view-id>/jsf/register/confirm.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/register/confirm.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>revise</from-outcome>
+ <to-view-id>/jsf/register/register.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>registered</from-outcome>
+ <to-view-id>/jsf/register/success.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>changePassword</from-outcome>
+ <to-view-id>/jsf/profile/changePassword.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/profile/changePassword.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>status</from-outcome>
+ <to-view-id>/jsf/profile/viewProfile.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <navigation-case>
+ <from-outcome>changeEmail</from-outcome>
+ <to-view-id>/jsf/profile/changeEmail.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/profile/changeEmail.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>status</from-outcome>
+ <to-view-id>/jsf/profile/viewProfile.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/index.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>editProfile</from-outcome>
+ <to-view-id>/jsf/profile/editProfileRedirect.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/profile/*</from-view-id>
+ <navigation-case>
+ <from-outcome>editProfile</from-outcome>
+ <to-view-id>/jsf/profile/editProfileRedirect.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-outcome>userAdmin</from-outcome>
+ <to-view-id>/jsf/admin/index.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/jsf/admin/index.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-outcome>roleAdmin</from-outcome>
+ <to-view-id>/jsf/admin/roles.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/index.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>createUser</from-outcome>
+ <to-view-id>/jsf/admin/user/createUser.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-outcome>searchUsers</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/index.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>showPendingUsers</from-outcome>
+ <to-view-id>/jsf/admin/user/pendingUsers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/pendingUsers.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>confirmPendingAction</from-outcome>
+ <to-view-id>/jsf/admin/user/confirmPendingAction.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>cancel</from-outcome>
+ <to-view-id>/jsf/admin/index.xthml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/confirmPendingAction.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>revise</from-outcome>
+ <to-view-id>/jsf/admin/user/pendingUsers.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/jsf/admin/index.xthml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/searchUsers.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>deleteUser</from-outcome>
+ <to-view-id>/jsf/admin/user/deleteUser.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/editProfile.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>adminChangePassword</from-outcome>
+ <to-view-id>/jsf/admin/user/changePassword.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-outcome>start</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-action>#{editprofilemgr.adminEditProfile}</from-action>
+ <from-outcome>editProfile</from-outcome>
+ <to-view-id>/jsf/admin/editProfile.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/*</from-view-id>
+ <navigation-case>
+ <from-action>#{assignrolemgr.assignRoles}</from-action>
+ <from-outcome>assignRoles</from-outcome>
+ <to-view-id>/jsf/admin/assignRoles.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/createUser.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>register</from-outcome>
+ <to-view-id>/jsf/admin/user/registerRoles.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/registerRoles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>register</from-outcome>
+ <to-view-id>/jsf/admin/user/registerConfirm.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/registerConfirm.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>revise</from-outcome>
+ <to-view-id>/jsf/admin/user/createUser.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>registered</from-outcome>
+ <to-view-id>/jsf/admin/index.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>createRole</from-outcome>
+ <to-view-id>/jsf/admin/roles/createRole.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>editRole</from-outcome>
+ <to-view-id>/jsf/admin/roles/editRole.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>viewMembers</from-outcome>
+ <to-view-id>/jsf/admin/roles/roleMembers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/roles.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>deleteRole</from-outcome>
+ <to-view-id>/jsf/admin/roles/deleteRole.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/editProfile.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>resetPassword</from-outcome>
+ <to-view-id>/jsf/admin/user/resetPassword.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/resetPassword.xhtml</from-view-id>
+ <navigation-case>
+ <from-action>#{lostpasswordmgr.doomed}</from-action>
+ <from-outcome>status</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-action>#{lostpasswordmgr.doomed}</from-action>
+ <from-outcome>lostPassword</from-outcome>
+ <to-view-id>/jsf/admin/editProfile.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/jsf/admin/user/changePassword.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>status</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>searchUsers</from-outcome>
+ <to-view-id>/jsf/admin/user/searchUsers.xhtml</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
</faces-config>
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/createRole.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/createRole.xhtml 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/createRole.xhtml 2009-05-15 12:10:05 UTC (rev 13376)
@@ -22,9 +22,7 @@
<h:form id="create-role-form">
<h:panelGrid columns="3">
<h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE}"/>
- <h:inputText id="rolename" value="#{createrolemgr.uiRole.name}" required="true">
- <f:validator validatorId="RoleValidator"/>
- </h:inputText>
+ <h:inputText id="rolename" value="#{createrolemgr.uiRole.name}" required="true"/>
<h:message for="rolename" infoClass="portlet-msg-success" errorClass="portlet-msg-error" fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
<h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE_DISPLAY}"/>
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml 2009-05-15 11:39:02 UTC (rev 13375)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-war/jsf/admin/roles/editRole.xhtml 2009-05-15 12:10:05 UTC (rev 13376)
@@ -18,18 +18,22 @@
<li class="pathSeparator"><h:graphicImage url="/img/pathSeparator.png" alt=">"/></li>
<li class="selected">
<h:outputText id="rolename" value="#{editrolemgr.uiRole.name}" />
- </li>
+ </li>
</ui:define>
<ui:define name="content">
<h3><h:outputText value="#{bundle.IDENTITY_MANAGEMENT_EDIT_ROLE}"/></h3>
<h:form id="edit-role-link">
- <h:panelGrid columns="2">
+ <h:panelGrid columns="3">
<h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE}"/>
<h:outputText id="rolename" value="#{editrolemgr.uiRole.name}" />
-
+ <h:message for="rolename" infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
+
<h:outputText value="#{bundle.IDENTITY_MANAGEMENT_ROLE_DISPLAY}"/>
<h:inputText id="display-name" value="#{editrolemgr.uiRole.displayName}"/>
+ <h:message for="display-name" infoClass="portlet-msg-success" errorClass="portlet-msg-error"
+ fatalClass="portlet-msg-error" warnClass="portlet-msg-alert"/>
</h:panelGrid>
<hr/>
<p style="text-align: right;">
15 years