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/ModifyUsersDB.java

    r30196 r35286  
    11/*
    2  *    txt2usersDB.java
     2 *    ModifyUsersDB.java
    33 *    Copyright (C) 2008 New Zealand Digital Library, http://www.nzdl.org
    44 *
     
    134134            if (password.equals(""))
    135135            {
    136                 password = user.password; // already stored hashed-and-hexed in DB
     136                password = user.getPassword(); // already stored hashed-and-hexed in DB
    137137            }
    138138            if (groups.equals(""))
    139139            {
    140                 groups = user.groups;
     140                groups = user.getOrigGroups();
    141141            }
    142142            if (accountstatus.equals(""))
    143143            {
    144                 accountstatus = user.accountstatus.equals("") ? "true" : user.accountstatus;
     144                accountstatus = user.getAccountStatus().equals("") ? "true" : user.getAccountStatus();
    145145            }
    146146            if (comment.equals(""))
    147147            {
    148                 comment = user.comment;
     148                comment = user.getComment();
    149149            }
    150150            if (email.equals(""))
    151151            {
    152                 email = user.email;
     152                email = user.getEmail();
    153153            }
    154154
Note: See TracChangeset for help on using the changeset viewer.