Changeset 33084 for main/trunk


Ignore:
Timestamp:
2019-05-16T14:40:32+12:00 (5 years ago)
Author:
kjdon
Message:

uid is no longer an attribute of the request. Instead its part of the UserContext. Improvement - if there is a username (=someone has logged in) then use the username as the berry basket key, that way if someone logs in they can see their basket across computers. if no username, use the id as before

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/BerryBasket.java

    r33072 r33084  
    9898    {
    9999
    100         String id = request.getAttribute("uid");
    101 
     100      UserContext userContext = new UserContext(request);
     101      String id = null;
     102      String user_name =userContext.getUsername();
     103      if (user_name == null) {
     104        id = userContext.getUserID();
     105      } else {
     106        id = user_name;
     107      }
    102108        if (userMap.containsKey(id))
    103109        {
     
    250256    protected Element processAddItem(Element request)
    251257    {
     258
    252259        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request);
    253260
     
    331338    protected Element processDeleteItems(Element request)
    332339    {
     340
    333341        Hashtable<String, Hashtable<String, Item>> docsMap = updateDocMap(request);
    334342
Note: See TracChangeset for help on using the changeset viewer.