[jboss-jira] [JBoss JIRA] Commented: (JBPORTAL-2352) I cannot create a role in LDAP
Chris Laprun (JIRA)
jira-events at lists.jboss.org
Fri Apr 10 11:58:22 EDT 2009
[ https://jira.jboss.org/jira/browse/JBPORTAL-2352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12461653#action_12461653 ]
Chris Laprun commented on JBPORTAL-2352:
----------------------------------------
When you commit something, please use only the JIRA task number (i.e. JBPORTAL-2532) not the full URL as that's how JIRA recognizes commits associated with a given issue. A short comment on what was done for each commit is also welcome in the commit message (so that people browsing the file history don't have to go to JIRA to see what was done).
Thanks for your contributions in any case! :)
> I cannot create a role in LDAP
> ------------------------------
>
> Key: JBPORTAL-2352
> URL: https://jira.jboss.org/jira/browse/JBPORTAL-2352
> Project: JBoss Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Portal Identity
> Affects Versions: 2.7.2 Final
> Environment: JBoss Portal 2.7.2, JBoss 4.2.3.GA, openldap
> Reporter: Luca Stancapiano
> Assignee: Luca Stancapiano
> Fix For: 2.8 Final, Identity-1.1
>
>
> If I try to create a role in JBoss Portal configured with LDAP through admin web console, I get a validation error by org.jboss.portal.core.identity.ui.validators.RoleValidator class. The problem is that RoleValidator searches for a role with the inserted role name using findRoleByName(String name) method of org.jboss.portal.identity.ldap.LDAPRoleModuleImpl. This method starts an Exception by 80 row:
> SearchResult res = (SearchResult)sr.iterator().next();
> because there are no roles for that name.
> The better thing to do could to be managing of a IdentityException when the search produces no results. Here there is an example:
> List sr = searchRoles(filter, null);
> if (sr.size() > 1)
> {
> throw new IdentityException("Found more than one role with id: " + name + "" +
> "Posible data inconsistency");
> }
> ---- new --------
> if (sr.size() == 0)
> {
> throw new IdentityException("No such role " + name);
> }
> -------------------
> starting a IdentityException, RoleValidator instance will ignore the problem and let to use createRole method to create the new role
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list