[JBoss Seam] - Re: SeamSelectItems - 1.1.1beta4
by Frippe
I have a stateless bean with that name as below.
I've removed a few things from this class which has no bearing on the current problem.
@Stateless
| @Name("aclList")
| public class ACLListActionImpl implements ACLListAction {
|
| @PersistenceContext
| private EntityManager em;
|
| @In
| private FacesMessages facesMessages;
|
| @Logger
| private Log log;
|
| @SelectItems(labelMethod="getName", valueStrategy=SelectItems.Strategy.INDEX)
| private List rights;
|
| @In(required=false)@Out(required=false)
| private ARO selAro;
|
| /**************************************************************************
| * Get all right types.
| * @return
| */
| @Factory("rights")
| public List getRights() {
| System.out.println("ACLListActionImpl:getRights()");
|
| // Only get the list once/request
| if(rights == null){
| rights = em.createQuery("from ARO").getResultList();
|
| selAro = (ARO)rights.get(0);
| }
| return rights;
| }
|
| @Factory("converter")
| public Converter getConverter() {
| System.out.println("ACLListImpl::getConverter()");
| return new SelectItemsConverter() {
|
| @Override
| protected Object convertToObject(FacesContext arg0, UIComponent arg1, String value) throws ConverterException {
| log.info("AroConverter:getAsObject() :: " + value);
|
| ARO aro = null;
| if ((value==null)||value.length()==0) {
| throw new ConverterException("Error 1 !");
| }
|
| for (Iterator iter = em.createQuery("from ARO").getResultList().iterator(); iter.hasNext();) {
| ARO a = (ARO) iter.next();
| if(a.getName().equals(value)){
| aro = a;
| break;
| }
| }
|
| // Sanity Check
| if (aro==null) {
| aro = new ARO();
| aro.setAro_id(0);
| }
|
| log.info(aro);
| return aro;
| }
|
| @Override
| protected String convertToString(FacesContext arg0, UIComponent arg1, Object value) throws ConverterException {
| System.out.println("AroConverter:convertToString() ::" + value);
| if(value instanceof ARO){
| return ((ARO)value).getName();
|
| }else if(value instanceof Long){
| return ((Long)value).toString();
|
| }else if(value instanceof String){
| return value.toString();
| }
|
| return "";
| }
| };
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011805#4011805
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011805
19Â years, 2Â months
[JBoss Portal] - Re: Portal With LDAP rquires Users in 2 places, LDAP and Por
by dleerob
I am having a similair issue. Pity no one has replied to your post. Hopefully someone can help me.
I have setup portal 2.4.1 to use LDAP authentication. However, it only authenticates with LDAP and allows access to portal. It doesn't pull in any user information. So I have to create a local user in portal. But now when I assign that local user security rights to certain pages, and then try and login with the ldap password, it authenticates against ldap, but the logged in user cannot see the pages I gave him rights to. However, If I login with the same user, but dont use my ldap password, but the local portal password I created the user with, I can then see the pages that I gave him security rights to.
So basically it seems that if I use the local jboss password for user "bob", it uses the security rights setup for "bob". But if I use the ldap password for user "bob", it treats the login a a different user, and all security rights are missing and I cant see his pages.
Any help please?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011799#4011799
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011799
19Â years, 2Â months