added Admin Modify User functionality

This commit is contained in:
Eric J. Bowersox
2001-04-16 05:23:39 +00:00
parent acc7f06e66
commit d63681a0ad
16 changed files with 1747 additions and 27 deletions

View File

@@ -31,6 +31,11 @@ public interface Audit
public static final int USER_CONTACT_INFO = 106;
public static final int RESEND_CONFIRM = 107;
public static final int PASSWORD_CHANGE = 108;
public static final int ADMIN_USER_CONTACT_INFO = 109;
public static final int ADMIN_PASSWORD_CHANGE = 110;
public static final int ADMIN_ACCOUNT_CHANGE = 111;
public static final int ADMIN_SET_SECURITY = 112;
public static final int ADMIN_LOCK_OUT = 113;
// Codes 201-300 - SIG events
public static final int CREATE_SIG = 201;

View File

@@ -26,17 +26,21 @@ public class Role implements Comparable, SecLevels
*--------------------------------------------------------------------------------
*/
private static Role not_in_list = null;
private static Role no_access = null;
private static Role unrestricted_user = null;
private static Role sig_host = null;
private static ArrayList global_low = null;
private static ArrayList global_high = null;
private static ArrayList sig_low = null;
private static ArrayList sig_high = null;
private static ArrayList conf_low = null;
private static ArrayList conf_high = null;
private static Role not_in_list;
private static Role no_access;
private static Role unrestricted_user;
private static Role global_admin;
private static Role sig_host;
private static ArrayList global_low;
private static ArrayList global_high;
private static ArrayList sig_low;
private static ArrayList sig_high;
private static ArrayList conf_low;
private static ArrayList conf_high;
private static HashMap all_roles;
private static List base_levels = null;
private static List base_levels_2 = null;
private static List sigreadlist_rc = null;
private static List sigwritelist_rc = null;
private static List sigcreatelist_rc = null;
@@ -131,6 +135,53 @@ public class Role implements Comparable, SecLevels
*--------------------------------------------------------------------------------
*/
public static Role getRoleForLevel(int level)
{
Role rc = (Role)(all_roles.get(new Integer(level)));
if (rc!=null)
return rc;
return new Role(level,"(Level " + level + ")");
} // end getRoleForLevel
public static List getBaseLevelChoices()
{
if (base_levels==null)
{ // create the returned list
ArrayList rc = new ArrayList();
rc.addAll(global_low);
rc.add(unrestricted_user);
rc.addAll(global_high);
rc.remove(rc.size()-1);
base_levels = Collections.unmodifiableList(rc);
} // end if
return base_levels;
} // end getBaseLevelChoices
public static List getBaseLevelChoices2()
{
if (base_levels_2==null)
{ // create the returned list
ArrayList rc = new ArrayList();
rc.addAll(global_low);
rc.add(unrestricted_user);
base_levels_2 = Collections.unmodifiableList(rc);
} // end if
return base_levels_2;
} // end getBaseLevelChoices2
public static Role getGlobalAdmin()
{
return global_admin;
} // end getGlobalAdmin
public static List getSIGReadList()
{
if (sigreadlist_rc==null)
@@ -342,46 +393,77 @@ public class Role implements Comparable, SecLevels
static
{
all_roles = new HashMap();
not_in_list = new Role(0,"(not in list)");
all_roles.put(new Integer(0),not_in_list);
no_access = new Role(NO_ACCESS,"No Access");
all_roles.put(new Integer(NO_ACCESS),no_access);
unrestricted_user = new Role(UNRESTRICTED_USER,"'Unrestricted' User");
all_roles.put(new Integer(UNRESTRICTED_USER),unrestricted_user);
Role tmp;
// initialize the "global lowband" vector
global_low = new ArrayList(3);
global_low.add(new Role(GLOBAL_ANONYMOUS,"Anonymous User"));
global_low.add(new Role(GLOBAL_UNVERIFIED,"Unauthenticated User"));
global_low.add(new Role(GLOBAL_NORMAL,"Normal User"));
tmp = new Role(GLOBAL_ANONYMOUS,"Anonymous User");
global_low.add(tmp);
all_roles.put(new Integer(GLOBAL_ANONYMOUS),tmp);
tmp = new Role(GLOBAL_UNVERIFIED,"Unauthenticated User");
global_low.add(tmp);
all_roles.put(new Integer(GLOBAL_UNVERIFIED),tmp);
tmp = new Role(GLOBAL_NORMAL,"Normal User");
global_low.add(tmp);
all_roles.put(new Integer(GLOBAL_NORMAL),tmp);
global_low.trimToSize();
// initialize the "global highband" vector
global_high = new ArrayList(3);
global_high.add(new Role(GLOBAL_ANYADMIN,"Any System Administrator"));
global_high.add(new Role(GLOBAL_PFY,"System Assistant Administrator"));
global_high.add(new Role(GLOBAL_BOFH,"Global System Administrator"));
tmp = new Role(GLOBAL_ANYADMIN,"Any System Administrator");
global_high.add(tmp);
all_roles.put(new Integer(GLOBAL_ANYADMIN),tmp);
tmp = new Role(GLOBAL_PFY,"System Assistant Administrator");
global_high.add(tmp);
all_roles.put(new Integer(GLOBAL_PFY),tmp);
global_admin = new Role(GLOBAL_BOFH,"Global System Administrator");
global_high.add(global_admin);
all_roles.put(new Integer(GLOBAL_BOFH),global_admin);
global_high.trimToSize();
// initialize the "SIG lowband" vector
sig_low = new ArrayList(1);
sig_low.add(new Role(SIG_MEMBER,"SIG Member"));
tmp = new Role(SIG_MEMBER,"SIG Member");
sig_low.add(tmp);
all_roles.put(new Integer(SIG_MEMBER),tmp);
sig_low.trimToSize();
// initialize the "SIG highband" vector
sig_high = new ArrayList(3);
sig_high.add(new Role(SIG_ANYADMIN,"Any SIG Administrator"));
sig_high.add(new Role(SIG_COHOST,"SIG Co-Host"));
tmp = new Role(SIG_ANYADMIN,"Any SIG Administrator");
sig_high.add(tmp);
all_roles.put(new Integer(SIG_ANYADMIN),tmp);
tmp = new Role(SIG_COHOST,"SIG Co-Host");
sig_high.add(tmp);
all_roles.put(new Integer(SIG_COHOST),tmp);
sig_host = new Role(SIG_HOST,"SIG Host");
sig_high.add(sig_host);
all_roles.put(new Integer(SIG_HOST),sig_host);
sig_high.trimToSize();
// initialize the "conference lowband" vector
conf_low = new ArrayList(1);
conf_low.add(new Role(CONFERENCE_MEMBER,"Conference Member"));
tmp = new Role(CONFERENCE_MEMBER,"Conference Member");
conf_low.add(tmp);
all_roles.put(new Integer(CONFERENCE_MEMBER),tmp);
conf_low.trimToSize();
// initialize the "conference highband" vector
conf_high = new ArrayList(2);
conf_high.add(new Role(CONFERENCE_ANYADMIN,"Any Conference Administrator"));
conf_high.add(new Role(CONFERENCE_HOST,"Conference Host"));
tmp = new Role(CONFERENCE_ANYADMIN,"Any Conference Administrator");
conf_high.add(tmp);
all_roles.put(new Integer(CONFERENCE_ANYADMIN),tmp);
tmp = new Role(CONFERENCE_HOST,"Conference Host");
conf_high.add(tmp);
all_roles.put(new Integer(CONFERENCE_HOST),tmp);
conf_high.trimToSize();
} // end static initializer