Ignore:
Timestamp:
2021-08-12T17:53:14+12:00 (3 years ago)
Author:
anupama
Message:

First commit to do with supporting user groups of the form nz.ac.waikato.cs.pinky or katoa.maori.place.iwi.hapu.person, which need to get expanded out as nz, nz.ac, nz.ac.waikato, nz.ac.waikato.cs, nz.ac.waikato.cs.pinky (no duplicates). 1. Added a function that expands the existing groups and a new member variable to UserTermInfo that holds the expanded groups. 2. As also advised by Dr Bainbridge: refactored the existing UserTermInfo class to have getter and setter functions as needed and constructor so its member vars don't remain public as that also made it hard to track down in which classes/methods these member vars get (re)set. This commit should not have functionally altered the code: the origGroups (and not expandedGroups) is used everywhere still. In a subsequent commit will work out where the expandedGroups need to get used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/UserQueryResult.java

    r25635 r35286  
    3939    public void addUserTerm(String username, String password, String groups, String accountstatus, String comment, String email)
    4040    {
    41         UserTermInfo ui = new UserTermInfo();
    42         ui.username = username;
    43         ui.password = password;
    44         ui.groups = groups;
    45         ui.accountstatus = accountstatus;
    46         ui.comment = comment;
    47         ui.email = email;
    48         users.add(ui);
     41        UserTermInfo ui = new UserTermInfo(username, password, groups,
     42                           accountstatus, comment, email);     
     43        users.add(ui);
    4944    }
    5045
Note: See TracChangeset for help on using the changeset viewer.