Hi Emilio

I have done something similar to what you whant, but I just whanted to check if the person was an administrator.

  You have to modify the method addUserMeta in:

  org.dspace.app.xmlui.aspect.eperson.Navigation.java.

  this is what I have done:

  ....

  String admin="false";
        EPerson eperson = context.getCurrentUser();
        if(Group.find(context, 1).isMember(eperson))
        {    admin="true";
        }
        if (eperson != null)
        {
            userMeta.setAuthenticated(true);
            userMeta.addMetadata("identifier").addContent(eperson.getID());
            userMeta.addMetadata("identifier","admin").addContent(admin);
            userMeta.addMetadata("identifier","email").addContent(eperson.getEmail());             userMeta.addMetadata("identifier","firstName").addContent(eperson.getFirstName());             userMeta.addMetadata("identifier","lastName").addContent(eperson.getLastName());             userMeta.addMetadata("identifier","logoutURL").addContent(contextPath+"/logout");             userMeta.addMetadata("identifier","url").addContent(contextPath+"/profile");
        }
        else
        {
            userMeta.setAuthenticated(false);
        }

  ....

  I hope it helps

  Paulo
------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to