THE GREAT RENAMING! All that was "SIG" should now be "community," except for
the database and the URLs (for backward compatibility). Do a full rebuild after browsing this one!
This commit is contained in:
@@ -37,19 +37,19 @@ public interface Audit
|
||||
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;
|
||||
// Codes 201-300 - Community events
|
||||
public static final int CREATE_COMMUNITY = 201;
|
||||
public static final int SET_MEMBERSHIP = 202;
|
||||
public static final int SIG_CONTACT_INFO = 203;
|
||||
public static final int SIG_FEATURE_SET = 204;
|
||||
public static final int SIG_NAME = 205;
|
||||
public static final int SIG_ALIAS = 206;
|
||||
public static final int SIG_CATEGORY = 207;
|
||||
public static final int SIG_HIDE_INFO = 208;
|
||||
public static final int SIG_MEMBERS_ONLY = 209;
|
||||
public static final int SIG_JOIN_KEY = 210;
|
||||
public static final int SIG_SECURITY = 211;
|
||||
public static final int DELETE_SIG = 212;
|
||||
public static final int COMMUNITY_CONTACT_INFO = 203;
|
||||
public static final int COMMUNITY_FEATURE_SET = 204;
|
||||
public static final int COMMUNITY_NAME = 205;
|
||||
public static final int COMMUNITY_ALIAS = 206;
|
||||
public static final int COMMUNITY_CATEGORY = 207;
|
||||
public static final int COMMUNITY_HIDE_INFO = 208;
|
||||
public static final int COMMUNITY_MEMBERS_ONLY = 209;
|
||||
public static final int COMMUNITY_JOIN_KEY = 210;
|
||||
public static final int COMMUNITY_SECURITY = 211;
|
||||
public static final int DELETE_COMMUNITY = 212;
|
||||
|
||||
// Codes 301-400 - Conference events
|
||||
public static final int CREATE_CONF = 301;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class AuditRecord implements AuditData
|
||||
{
|
||||
private HashMap descr_cache = new HashMap();
|
||||
private HashMap uname_cache = new HashMap();
|
||||
private HashMap signame_cache = new HashMap();
|
||||
private HashMap commname_cache = new HashMap();
|
||||
private Statement stmt;
|
||||
|
||||
DescrStringCache(Connection conn) throws SQLException
|
||||
@@ -82,25 +82,25 @@ public class AuditRecord implements AuditData
|
||||
|
||||
} // end getUserName
|
||||
|
||||
String getSIGName(int sigid) throws SQLException, DataException
|
||||
String getCommunityName(int cid) throws SQLException, DataException
|
||||
{
|
||||
if (sigid<=0)
|
||||
return ""; // no SIG
|
||||
Integer sigid_x = new Integer(sigid);
|
||||
String rc = (String)(signame_cache.get(sigid_x));
|
||||
if (cid<=0)
|
||||
return ""; // no community
|
||||
Integer cid_x = new Integer(cid);
|
||||
String rc = (String)(commname_cache.get(cid_x));
|
||||
if (rc==null)
|
||||
{ // OK, get it from the database
|
||||
ResultSet rs = stmt.executeQuery("SELECT signame FROM sigs WHERE sigid = " + sigid + ";");
|
||||
ResultSet rs = stmt.executeQuery("SELECT signame FROM sigs WHERE sigid = " + cid + ";");
|
||||
if (!(rs.next()))
|
||||
throw new DataException("SIG name not found for SIGID " + sigid);
|
||||
throw new DataException("community name not found for community ID " + cid);
|
||||
rc = rs.getString(1);
|
||||
signame_cache.put(sigid_x,rc);
|
||||
commname_cache.put(cid_x,rc);
|
||||
|
||||
} // end if
|
||||
|
||||
return rc;
|
||||
|
||||
} // end getSIGName
|
||||
} // end getCommunityName
|
||||
|
||||
} // end class DescrStringCache
|
||||
|
||||
@@ -113,55 +113,55 @@ public class AuditRecord implements AuditData
|
||||
private java.util.Date when; // the date/time of this audit event
|
||||
private int type; // the audit event type
|
||||
private int uid; // the user ID
|
||||
private int sigid; // the SIG ID
|
||||
private int cid; // the community ID
|
||||
private String ip; // the IP address of the user
|
||||
private String[] data; // the data values associated with the record
|
||||
private String descr = null; // audit record description
|
||||
private String uname = null; // user name of user
|
||||
private String signame = null; // name of SIG
|
||||
private String commname = null; // name of community
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
* Constructors
|
||||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public AuditRecord(int type, int uid, String ip, int sigid, String data1, String data2, String data3,
|
||||
public AuditRecord(int type, int uid, String ip, int cid, String data1, String data2, String data3,
|
||||
String data4)
|
||||
{
|
||||
setBaseData(type,uid,ip);
|
||||
this.sigid = sigid;
|
||||
this.cid = cid;
|
||||
setData(data1,data2,data3,data4);
|
||||
|
||||
} // end constructor
|
||||
|
||||
public AuditRecord(int type, int uid, String ip, int sigid, String data1, String data2, String data3)
|
||||
public AuditRecord(int type, int uid, String ip, int cid, String data1, String data2, String data3)
|
||||
{
|
||||
setBaseData(type,uid,ip);
|
||||
this.sigid = sigid;
|
||||
this.cid = cid;
|
||||
setData(data1,data2,data3,null);
|
||||
|
||||
} // end constructor
|
||||
|
||||
public AuditRecord(int type, int uid, String ip, int sigid, String data1, String data2)
|
||||
public AuditRecord(int type, int uid, String ip, int cid, String data1, String data2)
|
||||
{
|
||||
setBaseData(type,uid,ip);
|
||||
this.sigid = sigid;
|
||||
this.cid = cid;
|
||||
setData(data1,data2,null,null);
|
||||
|
||||
} // end constructor
|
||||
|
||||
public AuditRecord(int type, int uid, String ip, int sigid, String data1)
|
||||
public AuditRecord(int type, int uid, String ip, int cid, String data1)
|
||||
{
|
||||
setBaseData(type,uid,ip);
|
||||
this.sigid = sigid;
|
||||
this.cid = cid;
|
||||
setData(data1,null,null,null);
|
||||
|
||||
} // end constructor
|
||||
|
||||
public AuditRecord(int type, int uid, String ip, int sigid)
|
||||
public AuditRecord(int type, int uid, String ip, int cid)
|
||||
{
|
||||
setBaseData(type,uid,ip);
|
||||
this.sigid = sigid;
|
||||
this.cid = cid;
|
||||
setData(null,null,null,null);
|
||||
|
||||
} // end constructor
|
||||
@@ -169,7 +169,7 @@ public class AuditRecord implements AuditData
|
||||
public AuditRecord(int type, int uid, String ip, String data1, String data2, String data3, String data4)
|
||||
{
|
||||
setBaseData(type,uid,ip);
|
||||
this.sigid = 0;
|
||||
this.cid = 0;
|
||||
setData(data1,data2,data3,data4);
|
||||
|
||||
} // end constructor
|
||||
@@ -177,7 +177,7 @@ public class AuditRecord implements AuditData
|
||||
public AuditRecord(int type, int uid, String ip, String data1, String data2, String data3)
|
||||
{
|
||||
setBaseData(type,uid,ip);
|
||||
this.sigid = 0;
|
||||
this.cid = 0;
|
||||
setData(data1,data2,data3,null);
|
||||
|
||||
} // end constructor
|
||||
@@ -185,7 +185,7 @@ public class AuditRecord implements AuditData
|
||||
public AuditRecord(int type, int uid, String ip, String data1, String data2)
|
||||
{
|
||||
setBaseData(type,uid,ip);
|
||||
this.sigid = 0;
|
||||
this.cid = 0;
|
||||
setData(data1,data2,null,null);
|
||||
|
||||
} // end constructor
|
||||
@@ -193,7 +193,7 @@ public class AuditRecord implements AuditData
|
||||
public AuditRecord(int type, int uid, String ip, String data1)
|
||||
{
|
||||
setBaseData(type,uid,ip);
|
||||
this.sigid = 0;
|
||||
this.cid = 0;
|
||||
setData(data1,null,null,null);
|
||||
|
||||
} // end constructor
|
||||
@@ -201,7 +201,7 @@ public class AuditRecord implements AuditData
|
||||
public AuditRecord(int type, int uid, String ip)
|
||||
{
|
||||
setBaseData(type,uid,ip);
|
||||
this.sigid = 0;
|
||||
this.cid = 0;
|
||||
setData(null,null,null,null);
|
||||
|
||||
} // end constructor
|
||||
@@ -212,7 +212,7 @@ public class AuditRecord implements AuditData
|
||||
when = SQLUtil.getFullDateTime(rs,"on_date");
|
||||
type = rs.getInt("event");
|
||||
uid = rs.getInt("uid");
|
||||
sigid = rs.getInt("sigid");
|
||||
cid = rs.getInt("sigid");
|
||||
ip = rs.getString("ip");
|
||||
data = new String[DATA_COUNT];
|
||||
data[0] = rs.getString("data1");
|
||||
@@ -221,7 +221,7 @@ public class AuditRecord implements AuditData
|
||||
data[3] = rs.getString("data4");
|
||||
descr = cache.getDescription(type);
|
||||
uname = cache.getUserName(uid);
|
||||
signame = cache.getSIGName(sigid);
|
||||
commname = cache.getCommunityName(cid);
|
||||
|
||||
} // end constructor
|
||||
|
||||
@@ -279,11 +279,11 @@ public class AuditRecord implements AuditData
|
||||
|
||||
} // end getType
|
||||
|
||||
public int getSIGID()
|
||||
public int getCommunityID()
|
||||
{
|
||||
return sigid;
|
||||
return cid;
|
||||
|
||||
} // end getType
|
||||
} // end getCommunityID
|
||||
|
||||
public String getIPAddress()
|
||||
{
|
||||
@@ -309,11 +309,11 @@ public class AuditRecord implements AuditData
|
||||
|
||||
} // end getUserName
|
||||
|
||||
public String getSIGName()
|
||||
public String getCommunityName()
|
||||
{
|
||||
return signame;
|
||||
return commname;
|
||||
|
||||
} // end getSIGName
|
||||
} // end getCommunityName
|
||||
|
||||
/*--------------------------------------------------------------------------------
|
||||
* External operations
|
||||
@@ -333,7 +333,7 @@ public class AuditRecord implements AuditData
|
||||
+ "data3, data4) VALUES ('");
|
||||
java.util.Date now = new java.util.Date();
|
||||
sql.append(SQLUtil.encodeDate(now)).append("', ").append(type).append(", ").append(uid).append(", ");
|
||||
sql.append(sigid).append(", '").append(SQLUtil.encodeString(ip)).append("', ");
|
||||
sql.append(cid).append(", '").append(SQLUtil.encodeString(ip)).append("', ");
|
||||
sql.append(SQLUtil.encodeStringArg(data[0])).append(", ").append(SQLUtil.encodeStringArg(data[1]));
|
||||
sql.append(", ").append(SQLUtil.encodeStringArg(data[2])).append(", ");
|
||||
sql.append(SQLUtil.encodeStringArg(data[3])).append(");");
|
||||
@@ -361,7 +361,7 @@ public class AuditRecord implements AuditData
|
||||
*--------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public static List getAuditRecords(Connection conn, int sigid, int offset, int count)
|
||||
public static List getAuditRecords(Connection conn, int cid, int offset, int count)
|
||||
throws SQLException, DataException
|
||||
{
|
||||
ArrayList rc = new ArrayList();
|
||||
@@ -369,8 +369,8 @@ public class AuditRecord implements AuditData
|
||||
|
||||
Statement stmt = conn.createStatement();
|
||||
StringBuffer sql = new StringBuffer("SELECT * FROM audit");
|
||||
if (sigid>0)
|
||||
sql.append(" WHERE sigid = ").append(sigid);
|
||||
if (cid>0)
|
||||
sql.append(" WHERE sigid = ").append(cid);
|
||||
sql.append(" ORDER BY on_date DESC LIMIT ").append(offset).append(", ").append(count).append(';');
|
||||
ResultSet rs = stmt.executeQuery(sql.toString());
|
||||
|
||||
@@ -385,12 +385,12 @@ public class AuditRecord implements AuditData
|
||||
|
||||
} // end getAuditRecords
|
||||
|
||||
public static int getAuditRecordCount(Connection conn, int sigid) throws SQLException
|
||||
public static int getAuditRecordCount(Connection conn, int cid) throws SQLException
|
||||
{
|
||||
Statement stmt = conn.createStatement();
|
||||
StringBuffer sql = new StringBuffer("SELECT COUNT(*) FROM audit");
|
||||
if (sigid>0)
|
||||
sql.append(" WHERE sigid = ").append(sigid);
|
||||
if (cid>0)
|
||||
sql.append(" WHERE sigid = ").append(cid);
|
||||
sql.append(';');
|
||||
ResultSet rs = stmt.executeQuery(sql.toString());
|
||||
if (!(rs.next()))
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Capability implements SecLevels
|
||||
|
||||
public static boolean isCommunityAdmin(int level)
|
||||
{
|
||||
return (level>=SIG_ANYADMIN);
|
||||
return (level>=COMM_ANYADMIN);
|
||||
|
||||
} // end isCommunityAdmin
|
||||
|
||||
@@ -55,39 +55,39 @@ public class Capability implements SecLevels
|
||||
|
||||
} // end exemptFromMembershipRequirement
|
||||
|
||||
public static boolean hideHiddenSearchSIGs(int level)
|
||||
public static boolean hideHiddenSearchCommunities(int level)
|
||||
{
|
||||
return (level<GLOBAL_ANYADMIN);
|
||||
|
||||
} // end hideHiddenSearchSIGs
|
||||
} // end hideHiddenSearchCommunities
|
||||
|
||||
public static boolean hideHiddenDirectorySIGs(int level)
|
||||
public static boolean hideHiddenDirectoryCommunities(int level)
|
||||
{
|
||||
return (level<GLOBAL_ANYADMIN);
|
||||
|
||||
} // end hideHiddenSearchSIGs
|
||||
} // end hideHiddenSearchCommunities
|
||||
|
||||
public static boolean canJoinPrivateSIGWithoutKey(int level)
|
||||
public static boolean canJoinPrivateCommunityWithoutKey(int level)
|
||||
{
|
||||
return (level>=GLOBAL_ANYADMIN);
|
||||
|
||||
} // end canJoinPrivateSIGWithoutKey
|
||||
} // end canJoinPrivateCommunityWithoutKey
|
||||
|
||||
public static boolean showHiddenSearchCategories(int level)
|
||||
{
|
||||
return (level>=GLOBAL_ANYADMIN);
|
||||
|
||||
} // end hideHiddenSearchSIGs
|
||||
} // end showHioddenSearchCategories
|
||||
|
||||
public static boolean showHiddenSIGMembers(int level)
|
||||
public static boolean showHiddenCommunityMembers(int level)
|
||||
{
|
||||
return (level>=SIG_ANYADMIN);
|
||||
return (level>=COMM_ANYADMIN);
|
||||
|
||||
} // end showHiddenSIGMembers
|
||||
} // end showHiddenCommunityMembers
|
||||
|
||||
public static boolean hideHiddenConferences(int level)
|
||||
{
|
||||
return (level<SIG_ANYADMIN);
|
||||
return (level<COMM_ANYADMIN);
|
||||
|
||||
} // end hideHiddenConferences
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
|
||||
* language governing rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Venice Web Community System.
|
||||
* The Original Code is the Venice Web Communities System.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Eric J. Bowersox <erbo@silcom.com>,
|
||||
* for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
|
||||
@@ -25,11 +25,11 @@ public class DefaultLevels implements SecLevels
|
||||
|
||||
} // end newUser
|
||||
|
||||
public static int memberSIG()
|
||||
public static int memberCommunity()
|
||||
{
|
||||
return SIG_MEMBER;
|
||||
return COMM_MEMBER;
|
||||
|
||||
} // end memberSIG
|
||||
} // end memberCommunity
|
||||
|
||||
public static int PFY()
|
||||
{
|
||||
@@ -49,41 +49,41 @@ public class DefaultLevels implements SecLevels
|
||||
|
||||
} // end afterEmailAddressChange
|
||||
|
||||
public static int newSIGRead()
|
||||
public static int newCommunityRead()
|
||||
{
|
||||
return SIG_MEMBER;
|
||||
return COMM_MEMBER;
|
||||
|
||||
} // end newSIGRead
|
||||
} // end newCommunityRead
|
||||
|
||||
public static int newSIGWrite()
|
||||
public static int newCommunityWrite()
|
||||
{
|
||||
return SIG_COHOST;
|
||||
return COMM_COHOST;
|
||||
|
||||
} // end newSIGWrite
|
||||
} // end newCommunityWrite
|
||||
|
||||
public static int newSIGCreate()
|
||||
public static int newCommunityCreate()
|
||||
{
|
||||
return SIG_COHOST;
|
||||
return COMM_COHOST;
|
||||
|
||||
} // end newSIGCreate
|
||||
} // end newCommunityCreate
|
||||
|
||||
public static int newSIGDelete()
|
||||
public static int newCommunityDelete()
|
||||
{
|
||||
return SIG_HOST;
|
||||
return COMM_HOST;
|
||||
|
||||
} // end newSIGDelete
|
||||
} // end newCommunityDelete
|
||||
|
||||
public static int newSIGJoin()
|
||||
public static int newCommunityJoin()
|
||||
{
|
||||
return GLOBAL_NORMAL;
|
||||
|
||||
} // end newSIGJoin
|
||||
} // end newCommunityJoin
|
||||
|
||||
public static int creatorSIG()
|
||||
public static int creatorCommunity()
|
||||
{
|
||||
return SIG_HOST;
|
||||
return COMM_HOST;
|
||||
|
||||
} // end creatorSIG
|
||||
} // end creatorCommunity
|
||||
|
||||
public static int hostPrivsConference()
|
||||
{
|
||||
@@ -105,19 +105,19 @@ public class DefaultLevels implements SecLevels
|
||||
|
||||
public static int newConferenceRead(boolean pvt)
|
||||
{
|
||||
return (pvt ? CONFERENCE_MEMBER : SIG_MEMBER);
|
||||
return (pvt ? CONFERENCE_MEMBER : COMM_MEMBER);
|
||||
|
||||
} // end newConferenceRead
|
||||
|
||||
public static int newConferencePost(boolean pvt)
|
||||
{
|
||||
return (pvt ? CONFERENCE_MEMBER : SIG_MEMBER);
|
||||
return (pvt ? CONFERENCE_MEMBER : COMM_MEMBER);
|
||||
|
||||
} // end newConferencePost
|
||||
|
||||
public static int newConferenceCreate(boolean pvt)
|
||||
{
|
||||
return (pvt ? CONFERENCE_MEMBER : SIG_MEMBER);
|
||||
return (pvt ? CONFERENCE_MEMBER : COMM_MEMBER);
|
||||
|
||||
} // end newConferencePost
|
||||
|
||||
@@ -141,7 +141,7 @@ public class DefaultLevels implements SecLevels
|
||||
|
||||
public static int newConferenceDelete()
|
||||
{
|
||||
return SIG_COHOST;
|
||||
return COMM_COHOST;
|
||||
|
||||
} // end newConferenceHide
|
||||
|
||||
|
||||
@@ -30,23 +30,23 @@ public class Role implements Comparable, SecLevels
|
||||
private static Role no_access;
|
||||
private static Role unrestricted_user;
|
||||
private static Role global_admin;
|
||||
private static Role sig_host;
|
||||
private static Role comm_host;
|
||||
private static ArrayList global_low;
|
||||
private static ArrayList global_high;
|
||||
private static ArrayList sig_low;
|
||||
private static ArrayList sig_high;
|
||||
private static ArrayList comm_low;
|
||||
private static ArrayList comm_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;
|
||||
private static List sigdeletelist_rc = null;
|
||||
private static List sigjoinlist_rc = null;
|
||||
private static List sig_member_levels = null;
|
||||
private static List commreadlist_rc = null;
|
||||
private static List commwritelist_rc = null;
|
||||
private static List commcreatelist_rc = null;
|
||||
private static List commdeletelist_rc = null;
|
||||
private static List commjoinlist_rc = null;
|
||||
private static List comm_member_levels = null;
|
||||
private static List confreadlist_rc = null;
|
||||
private static List confpostlist_rc = null;
|
||||
private static List confhidelist_rc = null;
|
||||
@@ -182,105 +182,105 @@ public class Role implements Comparable, SecLevels
|
||||
|
||||
} // end getGlobalAdmin
|
||||
|
||||
public static List getSIGReadList()
|
||||
public static List getCommunityReadList()
|
||||
{
|
||||
if (sigreadlist_rc==null)
|
||||
if (commreadlist_rc==null)
|
||||
{ // create the returned list
|
||||
ArrayList rc = new ArrayList();
|
||||
rc.addAll(global_low);
|
||||
rc.addAll(sig_low);
|
||||
rc.addAll(comm_low);
|
||||
rc.add(unrestricted_user);
|
||||
rc.addAll(sig_high);
|
||||
rc.addAll(comm_high);
|
||||
rc.add(global_high.get(0));
|
||||
sigreadlist_rc = Collections.unmodifiableList(rc);
|
||||
commreadlist_rc = Collections.unmodifiableList(rc);
|
||||
|
||||
} // end if
|
||||
|
||||
return sigreadlist_rc;
|
||||
return commreadlist_rc;
|
||||
|
||||
} // end getSIGReadList
|
||||
} // end getCommunityReadList
|
||||
|
||||
public static List getSIGWriteList()
|
||||
public static List getCommunityWriteList()
|
||||
{
|
||||
if (sigwritelist_rc==null)
|
||||
if (commwritelist_rc==null)
|
||||
{ // build the return value
|
||||
ArrayList rc = new ArrayList();
|
||||
rc.addAll(sig_high);
|
||||
rc.addAll(comm_high);
|
||||
rc.addAll(global_high);
|
||||
sigwritelist_rc = Collections.unmodifiableList(rc);
|
||||
commwritelist_rc = Collections.unmodifiableList(rc);
|
||||
|
||||
} // end if
|
||||
|
||||
return sigwritelist_rc;
|
||||
return commwritelist_rc;
|
||||
|
||||
} // end getSIGWriteList
|
||||
} // end getCommunityWriteList
|
||||
|
||||
public static List getSIGCreateList()
|
||||
public static List getCommunityCreateList()
|
||||
{
|
||||
if (sigcreatelist_rc==null)
|
||||
if (commcreatelist_rc==null)
|
||||
{ // create the return list
|
||||
ArrayList rc = new ArrayList();
|
||||
rc.add(global_low.get(global_low.size()-1));
|
||||
rc.addAll(sig_low);
|
||||
rc.addAll(comm_low);
|
||||
rc.add(unrestricted_user);
|
||||
rc.addAll(sig_high);
|
||||
rc.addAll(comm_high);
|
||||
rc.add(global_high.get(0));
|
||||
sigcreatelist_rc = Collections.unmodifiableList(rc);
|
||||
commcreatelist_rc = Collections.unmodifiableList(rc);
|
||||
|
||||
} // end if
|
||||
|
||||
return sigcreatelist_rc;
|
||||
return commcreatelist_rc;
|
||||
|
||||
} // end getSIGCreateList
|
||||
} // end getCommunityCreateList
|
||||
|
||||
public static List getSIGDeleteList()
|
||||
public static List getCommunityDeleteList()
|
||||
{
|
||||
if (sigdeletelist_rc==null)
|
||||
if (commdeletelist_rc==null)
|
||||
{ // create the return list
|
||||
ArrayList rc = new ArrayList();
|
||||
rc.addAll(sig_high);
|
||||
rc.addAll(comm_high);
|
||||
rc.addAll(global_high);
|
||||
rc.add(no_access);
|
||||
sigdeletelist_rc = Collections.unmodifiableList(rc);
|
||||
commdeletelist_rc = Collections.unmodifiableList(rc);
|
||||
|
||||
} // end if
|
||||
|
||||
return sigdeletelist_rc;
|
||||
return commdeletelist_rc;
|
||||
|
||||
} // end getSIGDeleteList
|
||||
} // end getCommunityDeleteList
|
||||
|
||||
public static List getSIGJoinList()
|
||||
public static List getCommunityJoinList()
|
||||
{
|
||||
if (sigjoinlist_rc==null)
|
||||
sigjoinlist_rc = Collections.unmodifiableList(global_low);
|
||||
return sigjoinlist_rc;
|
||||
if (commjoinlist_rc==null)
|
||||
commjoinlist_rc = Collections.unmodifiableList(global_low);
|
||||
return commjoinlist_rc;
|
||||
|
||||
} // end getSIGJoinList
|
||||
} // end getCommunityJoinList
|
||||
|
||||
public static List getSIGMemberLevelChoices()
|
||||
public static List getCommunityMemberLevelChoices()
|
||||
{
|
||||
if (sig_member_levels==null)
|
||||
if (comm_member_levels==null)
|
||||
{ // figure out the member levels list
|
||||
ArrayList rc = new ArrayList();
|
||||
rc.add(not_in_list);
|
||||
rc.addAll(global_low);
|
||||
rc.addAll(sig_low);
|
||||
rc.addAll(comm_low);
|
||||
rc.add(unrestricted_user);
|
||||
rc.addAll(sig_high);
|
||||
rc.addAll(comm_high);
|
||||
rc.remove(rc.size()-1);
|
||||
sig_member_levels = Collections.unmodifiableList(rc);
|
||||
comm_member_levels = Collections.unmodifiableList(rc);
|
||||
|
||||
} // end if
|
||||
|
||||
return sig_member_levels;
|
||||
return comm_member_levels;
|
||||
|
||||
} // end getSIGMemberLevelChoices
|
||||
} // end getCommunityMemberLevelChoices
|
||||
|
||||
public static Role getSIGHostRole()
|
||||
public static Role getCommunityHostRole()
|
||||
{
|
||||
return sig_host;
|
||||
return comm_host;
|
||||
|
||||
} // end getSIGHostRole
|
||||
} // end getCommunityHostRole
|
||||
|
||||
public static List getConferenceReadList()
|
||||
{
|
||||
@@ -288,7 +288,7 @@ public class Role implements Comparable, SecLevels
|
||||
{ // precalculate the conference read list
|
||||
ArrayList rc = new ArrayList();
|
||||
rc.addAll(global_low);
|
||||
rc.addAll(sig_low);
|
||||
rc.addAll(comm_low);
|
||||
rc.addAll(conf_low);
|
||||
rc.add(unrestricted_user);
|
||||
confreadlist_rc = Collections.unmodifiableList(rc);
|
||||
@@ -305,7 +305,7 @@ public class Role implements Comparable, SecLevels
|
||||
{ // precalculate the post list
|
||||
ArrayList rc = new ArrayList();
|
||||
rc.addAll(global_low);
|
||||
rc.addAll(sig_low);
|
||||
rc.addAll(comm_low);
|
||||
rc.addAll(conf_low);
|
||||
rc.add(unrestricted_user);
|
||||
rc.addAll(conf_high);
|
||||
@@ -329,7 +329,7 @@ public class Role implements Comparable, SecLevels
|
||||
{ // precalculate the hide list
|
||||
ArrayList rc = new ArrayList();
|
||||
rc.addAll(conf_high);
|
||||
rc.addAll(sig_high);
|
||||
rc.addAll(comm_high);
|
||||
rc.add(global_high.get(0));
|
||||
confhidelist_rc = Collections.unmodifiableList(rc);
|
||||
|
||||
@@ -356,7 +356,7 @@ public class Role implements Comparable, SecLevels
|
||||
if (confdeletelist_rc==null)
|
||||
{ // precalculate the delete list
|
||||
ArrayList rc = new ArrayList();
|
||||
rc.addAll(sig_high);
|
||||
rc.addAll(comm_high);
|
||||
rc.addAll(global_high);
|
||||
rc.add(no_access);
|
||||
confdeletelist_rc = Collections.unmodifiableList(rc);
|
||||
@@ -374,7 +374,7 @@ public class Role implements Comparable, SecLevels
|
||||
ArrayList rc = new ArrayList();
|
||||
rc.add(not_in_list);
|
||||
rc.addAll(global_low);
|
||||
rc.addAll(sig_low);
|
||||
rc.addAll(comm_low);
|
||||
rc.addAll(conf_low);
|
||||
rc.add(unrestricted_user);
|
||||
rc.add(conf_high.get(conf_high.size()-1));
|
||||
@@ -429,25 +429,25 @@ public class Role implements Comparable, SecLevels
|
||||
all_roles.put(new Integer(GLOBAL_BOFH),global_admin);
|
||||
global_high.trimToSize();
|
||||
|
||||
// initialize the "SIG lowband" vector
|
||||
sig_low = new ArrayList(1);
|
||||
tmp = new Role(SIG_MEMBER,"SIG Member");
|
||||
sig_low.add(tmp);
|
||||
all_roles.put(new Integer(SIG_MEMBER),tmp);
|
||||
sig_low.trimToSize();
|
||||
// initialize the "community lowband" vector
|
||||
comm_low = new ArrayList(1);
|
||||
tmp = new Role(COMM_MEMBER,"Community Member");
|
||||
comm_low.add(tmp);
|
||||
all_roles.put(new Integer(COMM_MEMBER),tmp);
|
||||
comm_low.trimToSize();
|
||||
|
||||
// initialize the "SIG highband" vector
|
||||
sig_high = new ArrayList(3);
|
||||
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 "communtiy highband" vector
|
||||
comm_high = new ArrayList(3);
|
||||
tmp = new Role(COMM_ANYADMIN,"Any Community Administrator");
|
||||
comm_high.add(tmp);
|
||||
all_roles.put(new Integer(COMM_ANYADMIN),tmp);
|
||||
tmp = new Role(COMM_COHOST,"Community Co-Host");
|
||||
comm_high.add(tmp);
|
||||
all_roles.put(new Integer(COMM_COHOST),tmp);
|
||||
comm_host = new Role(COMM_HOST,"Community Host");
|
||||
comm_high.add(comm_host);
|
||||
all_roles.put(new Integer(COMM_HOST),comm_host);
|
||||
comm_high.trimToSize();
|
||||
|
||||
// initialize the "conference lowband" vector
|
||||
conf_low = new ArrayList(1);
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface SecLevels
|
||||
{
|
||||
/**
|
||||
* Indicates "no access" (not even to the global system administrator). Used as the
|
||||
* "delete" level for the Administration SIG, so it can't be accidentally deleted.
|
||||
* "delete" level for the Administration Community, so it can't be accidentally deleted.
|
||||
*/
|
||||
public static final int NO_ACCESS = 65500;
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ public interface SecLevels
|
||||
public static final int UNRESTRICTED_USER = 32500;
|
||||
/**
|
||||
* Indicates a user that has not logged in ("Anonymous Honyak"). Can be used as a
|
||||
* permission level for SIGs and conferences to permit public reading and/or anonymous
|
||||
* permission level for communities and conferences to permit public reading and/or anonymous
|
||||
* posting.
|
||||
*/
|
||||
public static final int GLOBAL_ANONYMOUS = 100;
|
||||
@@ -42,7 +42,7 @@ public interface SecLevels
|
||||
public static final int GLOBAL_UNVERIFIED = 500;
|
||||
/**
|
||||
* Indicates a user that has registered and been verified. Can be used as a permission
|
||||
* level for SIGs and conferences to permit reading and/or posting by nonmembers.
|
||||
* level for communities and conferences to permit reading and/or posting by nonmembers.
|
||||
*/
|
||||
public static final int GLOBAL_NORMAL = 1000;
|
||||
/**
|
||||
@@ -61,26 +61,26 @@ public interface SecLevels
|
||||
*/
|
||||
public static final int GLOBAL_ANYADMIN = 63000;
|
||||
/**
|
||||
* The security level assigned to members of a SIG within that SIG.
|
||||
* The security level assigned to members of a community within that community.
|
||||
*/
|
||||
public static final int SIG_MEMBER = 6500;
|
||||
public static final int COMM_MEMBER = 6500;
|
||||
/**
|
||||
* The security level assigned to cohosts of a SIG within that SIG.
|
||||
* The security level assigned to cohosts of a community within that community.
|
||||
*/
|
||||
public static final int SIG_COHOST = 58000;
|
||||
public static final int COMM_COHOST = 58000;
|
||||
/**
|
||||
* The security level assigned to hosts of a SIG within that SIG.
|
||||
* The security level assigned to hosts of a community within that community.
|
||||
*/
|
||||
public static final int SIG_HOST = 58500;
|
||||
public static final int COMM_HOST = 58500;
|
||||
/**
|
||||
* A security level used to indicate any account with admin privileges over a specific SIG.
|
||||
* A security level used to indicate any account with admin privileges over a specific community.
|
||||
*/
|
||||
public static final int SIG_ANYADMIN = 57000;
|
||||
public static final int COMM_ANYADMIN = 57000;
|
||||
/**
|
||||
* The maximum level in the "high band" of the SIG scope; used to test if a user already has
|
||||
* maximum privs within the SIG (because of being an admin at global scope, perhaps).
|
||||
* The maximum level in the "high band" of the community scope; used to test if a user already has
|
||||
* maximum privs within the community (because of being an admin at global scope, perhaps).
|
||||
*/
|
||||
public static final int SIG_MAXADMIN = 58999;
|
||||
public static final int COMM_MAXADMIN = 58999;
|
||||
/**
|
||||
* The security level assigned to members of a (private) conference within that conference.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user