added the CommunityManager, the initial implementation of community objects,
and related supporting code and database material
This commit is contained in:
@@ -168,6 +168,13 @@
|
||||
<database connection="data"/>
|
||||
</object>
|
||||
|
||||
<object name="communities" classname="com.silverwrist.venice.community.CommunityManager" priority="101">
|
||||
<database connection="data" namespaces="nscache"/>
|
||||
<security object="srm"/>
|
||||
<user-manager object="users"/>
|
||||
<providers categories="categories"/>
|
||||
</object>
|
||||
|
||||
<!-- The Venice application layer -->
|
||||
<application name="venice" classname="com.silverwrist.venice.app.VeniceApplication">
|
||||
<stylesheet-mappings>
|
||||
|
||||
@@ -336,85 +336,90 @@ INSERT INTO namespaces (nsid, namespace) VALUES
|
||||
(10, 'http://www.silverwrist.com/NS/venice/2002/12/31/user.settings' ),
|
||||
(11, 'http://www.silverwrist.com/NS/venice/2002/12/31/user.profile' ),
|
||||
(12, 'http://www.silverwrist.com/NS/venice/2003/01/03/system.mail.messages' ),
|
||||
(13, 'http://www.silverwrist.com/NS/venice/2003/05/24/system.permissions' );
|
||||
(13, 'http://www.silverwrist.com/NS/venice/2003/05/24/system.permissions' ),
|
||||
(14, 'http://www.silverwrist.com/NS/venice/2003/05/28/community.permissions'),
|
||||
(15, 'http://www.silverwrist.com/NS/venice/2003/05/29/community.profile' );
|
||||
|
||||
# Initial global properties setup
|
||||
INSERT INTO globalprop (nsid, prop_name, prop_value) VALUES
|
||||
(1, 'site.title', '!Venice Test' ),
|
||||
(1, 'optionset', '_OS:AC' ),
|
||||
(1, 'site.url', '!http://localhost:8080/venice/' ),
|
||||
(1, 'site.logo.url', '!temp/site-logo.jpg' ),
|
||||
(1, 'site.logo.url.type', '!IMAGE' ),
|
||||
(1, 'site.logo.width', 'I140' ),
|
||||
(1, 'site.logo.height', 'I80' ),
|
||||
(1, 'frame.template', '!frame.vm' ),
|
||||
(1, 'footer.logo.scale', 'I100' ),
|
||||
(1, 'page.icon.url', '!venice-icon.png' ),
|
||||
(1, 'page.icon.url.type', '!IMAGE' ),
|
||||
(1, 'page.icon.type', '!image/png' ),
|
||||
(1, 'page.favicon.url', '!venice-favicon.ico' ),
|
||||
(1, 'page.favicon.url.type', '!IMAGE' ),
|
||||
(1, 'frontpage.title', '!My Front Page' ),
|
||||
(1, 'left.bar.width', 'I120' ),
|
||||
(2, 'sheet.base.normal', '!stylesheets/normal_base.vm' ),
|
||||
(2, 'sheet.adv.normal', '!stylesheets/adv_base.vm' ),
|
||||
(5, 'smtp.host', '!localhost' ),
|
||||
(5, 'system.mail.from.addr', '!nobody@delenn.silverwrist.internal'),
|
||||
(5, 'system.mail.from.name', '!Venice Mail System' ),
|
||||
(5, 'mailer.name', '!Venice AutoMail System' ),
|
||||
(5, 'user.info.header', '!X-Venice-User-Info' ),
|
||||
(6, 'subdir.buttons', '!buttons/classic' ),
|
||||
(6, 'std.button.width', 'I80' ),
|
||||
(6, 'std.button.height', 'I24' ),
|
||||
(6, 'bn.0transparent', '!transparent.gif' ),
|
||||
(6, 'bnc.0transparent', '!' ),
|
||||
(6, 'bn.cancel', '!cancel.jpg' ),
|
||||
(6, 'bnc.cancel', '!Cancel' ),
|
||||
(6, 'bn.configure', '!configure.jpg' ),
|
||||
(6, 'bnc.configure', '!Configure' ),
|
||||
(6, 'bn.create', '!create.jpg' ),
|
||||
(6, 'bnc.create', '!Create' ),
|
||||
(6, 'bn.i.accept', '!user_accept.jpg' ),
|
||||
(6, 'bnc.i.accept', '!I Accept' ),
|
||||
(6, 'bn.i.decline', '!user_decline.jpg' ),
|
||||
(6, 'bnc.i.decline', '!I Decline' ),
|
||||
(6, 'bn.login', '!login.jpg' ),
|
||||
(6, 'bnc.login', '!Log In' ),
|
||||
(6, 'bn.next', '!arrow_next.jpg' ),
|
||||
(6, 'bnc.next', '!Next' ),
|
||||
(6, 'bn.ok', '!ok.jpg' ),
|
||||
(6, 'bnc.ok', '!OK' ),
|
||||
(6, 'bn.previous', '!arrow_previous.jpg' ),
|
||||
(6, 'bnc.previous', '!Previous' ),
|
||||
(6, 'bn.reminder', '!reminder.jpg' ),
|
||||
(6, 'bnc.reminder', '!Reminder' ),
|
||||
(6, 'bn.search', '!search.jpg' ),
|
||||
(6, 'bnc.search', '!Search' ),
|
||||
(6, 'bn.send.again', '!send_again.jpg' ),
|
||||
(6, 'bnc.send.again', '!Send Again' ),
|
||||
(6, 'bn.send.email', '!send_email.jpg' ),
|
||||
(6, 'bnc.send.email', '!Send E-Mail' ),
|
||||
(6, 'bn.set', '!set.jpg' ),
|
||||
(6, 'bnc.set', '!Set' ),
|
||||
(6, 'bn.update', '!update.jpg' ),
|
||||
(6, 'bnc.update', '!Update' ),
|
||||
(6, 'user.agreement.title', '!Venice User Agreement' ),
|
||||
(6, 'user.photo.width', 'I100' ),
|
||||
(6, 'user.photo.height', 'I100' ),
|
||||
(6, 'user.nophoto.url', '!photo_not_avail.gif' ),
|
||||
(6, 'user.nophoto.url.type', '!IMAGE' ),
|
||||
(7, 'session.init.script', '!/util/session_init.js' ),
|
||||
(7, 'login.cookie', '!VeniceAuth' ),
|
||||
(7, 'login.cookie.maxage', 'I365' ),
|
||||
(7, 'password.recovery.time', 'I60' ),
|
||||
(10, 'timezone', '_TZ:UTC' ),
|
||||
(10, 'locale', '_LOC:en_US' ),
|
||||
(10, 'admin.flags', '_OS:' ),
|
||||
(10, 'search.result.count', 'I20' ),
|
||||
(11, 'privacy', '_OS:' ),
|
||||
(12, 'confirm.message.title', '!Venice E-Mail Confirmation' ),
|
||||
(12, 'password.change.message.title', '!Venice Password Changed' ),
|
||||
(12, 'reminder.message.title', '!Venice Password Reminder Message' );
|
||||
(1, 'site.title', '!Venice Test' ),
|
||||
(1, 'optionset', '_OS:AC' ),
|
||||
(1, 'site.url', '!http://localhost:8080/venice/' ),
|
||||
(1, 'site.logo.url', '!temp/site-logo.jpg' ),
|
||||
(1, 'site.logo.url.type', '!IMAGE' ),
|
||||
(1, 'site.logo.width', 'I140' ),
|
||||
(1, 'site.logo.height', 'I80' ),
|
||||
(1, 'frame.template', '!frame.vm' ),
|
||||
(1, 'footer.logo.scale', 'I100' ),
|
||||
(1, 'page.icon.url', '!venice-icon.png' ),
|
||||
(1, 'page.icon.url.type', '!IMAGE' ),
|
||||
(1, 'page.icon.type', '!image/png' ),
|
||||
(1, 'page.favicon.url', '!venice-favicon.ico' ),
|
||||
(1, 'page.favicon.url.type', '!IMAGE' ),
|
||||
(1, 'frontpage.title', '!My Front Page' ),
|
||||
(1, 'left.bar.width', 'I120' ),
|
||||
(2, 'sheet.base.normal', '!stylesheets/normal_base.vm' ),
|
||||
(2, 'sheet.adv.normal', '!stylesheets/adv_base.vm' ),
|
||||
(5, 'smtp.host', '!localhost' ),
|
||||
(5, 'system.mail.from.addr', '!nobody@delenn.silverwrist.internal' ),
|
||||
(5, 'system.mail.from.name', '!Venice Mail System' ),
|
||||
(5, 'mailer.name', '!Venice AutoMail System' ),
|
||||
(5, 'user.info.header', '!X-Venice-User-Info' ),
|
||||
(6, 'subdir.buttons', '!buttons/classic' ),
|
||||
(6, 'std.button.width', 'I80' ),
|
||||
(6, 'std.button.height', 'I24' ),
|
||||
(6, 'bn.0transparent', '!transparent.gif' ),
|
||||
(6, 'bnc.0transparent', '!' ),
|
||||
(6, 'bn.cancel', '!cancel.jpg' ),
|
||||
(6, 'bnc.cancel', '!Cancel' ),
|
||||
(6, 'bn.configure', '!configure.jpg' ),
|
||||
(6, 'bnc.configure', '!Configure' ),
|
||||
(6, 'bn.create', '!create.jpg' ),
|
||||
(6, 'bnc.create', '!Create' ),
|
||||
(6, 'bn.i.accept', '!user_accept.jpg' ),
|
||||
(6, 'bnc.i.accept', '!I Accept' ),
|
||||
(6, 'bn.i.decline', '!user_decline.jpg' ),
|
||||
(6, 'bnc.i.decline', '!I Decline' ),
|
||||
(6, 'bn.login', '!login.jpg' ),
|
||||
(6, 'bnc.login', '!Log In' ),
|
||||
(6, 'bn.next', '!arrow_next.jpg' ),
|
||||
(6, 'bnc.next', '!Next' ),
|
||||
(6, 'bn.ok', '!ok.jpg' ),
|
||||
(6, 'bnc.ok', '!OK' ),
|
||||
(6, 'bn.previous', '!arrow_previous.jpg' ),
|
||||
(6, 'bnc.previous', '!Previous' ),
|
||||
(6, 'bn.reminder', '!reminder.jpg' ),
|
||||
(6, 'bnc.reminder', '!Reminder' ),
|
||||
(6, 'bn.search', '!search.jpg' ),
|
||||
(6, 'bnc.search', '!Search' ),
|
||||
(6, 'bn.send.again', '!send_again.jpg' ),
|
||||
(6, 'bnc.send.again', '!Send Again' ),
|
||||
(6, 'bn.send.email', '!send_email.jpg' ),
|
||||
(6, 'bnc.send.email', '!Send E-Mail' ),
|
||||
(6, 'bn.set', '!set.jpg' ),
|
||||
(6, 'bnc.set', '!Set' ),
|
||||
(6, 'bn.update', '!update.jpg' ),
|
||||
(6, 'bnc.update', '!Update' ),
|
||||
(6, 'user.agreement.title', '!Venice User Agreement' ),
|
||||
(6, 'user.photo.width', 'I100' ),
|
||||
(6, 'user.photo.height', 'I100' ),
|
||||
(6, 'user.nophoto.url', '!photo_not_avail.gif' ),
|
||||
(6, 'user.nophoto.url.type', '!IMAGE' ),
|
||||
(7, 'session.init.script', '!/util/session_init.js' ),
|
||||
(7, 'login.cookie', '!VeniceAuth' ),
|
||||
(7, 'login.cookie.maxage', 'I365' ),
|
||||
(7, 'password.recovery.time', 'I60' ),
|
||||
(10, 'timezone', '_TZ:UTC' ),
|
||||
(10, 'locale', '_LOC:en_US' ),
|
||||
(10, 'admin.flags', '_OS:' ),
|
||||
(10, 'search.result.count', 'I20' ),
|
||||
(11, 'privacy', '_OS:' ),
|
||||
(12, 'confirm.message.title', '!Venice E-Mail Confirmation' ),
|
||||
(12, 'password.change.message.title', '!Venice Password Changed' ),
|
||||
(12, 'reminder.message.title', '!Venice Password Reminder Message' ),
|
||||
(15, 'rules', '!Please treat one another with courtesy and respect.'),
|
||||
(15, 'language', '_LANG:en-US' ),
|
||||
(15, 'country', '_CTRY:US' );
|
||||
|
||||
# Initial global blocks setup
|
||||
INSERT INTO globalblock (nsid, block_name, block) VALUES
|
||||
@@ -579,24 +584,27 @@ INSERT INTO aclowner (aclid, ownerid, flags) VALUES (2, 2, 0);
|
||||
INSERT INTO ace (aceid, pri, flags) VALUES (2, 1, 1);
|
||||
INSERT INTO acldata (aclid, seq, aceid) VALUES (2, 0, 2);
|
||||
INSERT INTO acedata (aceid, perm_nsid, perm_name) VALUES
|
||||
(2, 1, 'set.property' ),
|
||||
(2, 1, 'set.block' ),
|
||||
(2, 2, 'set.property' ),
|
||||
(2, 3, 'edit.all' ),
|
||||
(2, 3, 'bypass.email.verify'),
|
||||
(2, 3, 'view.all' ),
|
||||
(2, 5, 'set.property' ),
|
||||
(2, 5, 'set.block' ),
|
||||
(2, 6, 'set.property' ),
|
||||
(2, 6, 'set.block' ),
|
||||
(2, 7, 'set.property' ),
|
||||
(2, 10, 'set.property' ),
|
||||
(2, 10, 'remove.property' ),
|
||||
(2, 11, 'set.property' ),
|
||||
(2, 11, 'remove.property' ),
|
||||
(2, 12, 'set.property' ),
|
||||
(2, 12, 'set.block' ),
|
||||
(2, 13, 'show.admin.menu' );
|
||||
(2, 1, 'set.property' ),
|
||||
(2, 1, 'set.block' ),
|
||||
(2, 2, 'set.property' ),
|
||||
(2, 3, 'edit.all' ),
|
||||
(2, 3, 'bypass.email.verify' ),
|
||||
(2, 3, 'view.all' ),
|
||||
(2, 5, 'set.property' ),
|
||||
(2, 5, 'set.block' ),
|
||||
(2, 6, 'set.property' ),
|
||||
(2, 6, 'set.block' ),
|
||||
(2, 7, 'set.property' ),
|
||||
(2, 10, 'set.property' ),
|
||||
(2, 10, 'remove.property' ),
|
||||
(2, 11, 'set.property' ),
|
||||
(2, 11, 'remove.property' ),
|
||||
(2, 12, 'set.property' ),
|
||||
(2, 12, 'set.block' ),
|
||||
(2, 13, 'show.admin.menu' ),
|
||||
(2, 14, 'see.member.community.lists'),
|
||||
(2, 14, 'community.directory.all' ),
|
||||
(2, 14, 'community.search.all' );
|
||||
INSERT INTO ace (aceid, pri, flags) VALUES (3, 2, 0);
|
||||
INSERT INTO acldata (aclid, seq, aceid) VALUES (2, 1, 3);
|
||||
INSERT INTO acedata (aceid, perm_nsid, perm_name) VALUES
|
||||
@@ -631,6 +639,68 @@ INSERT INTO auditevent (eventid, event_nsid, event_name, descr) VALUES
|
||||
INSERT INTO imagetype (typecode, nsid, name) VALUES
|
||||
(1, 11, 'user.photo');
|
||||
|
||||
# Create the "members" group for the initial community.
|
||||
# (GID 4)
|
||||
INSERT INTO groups (gid, groupname) VALUES (4, 'Members:piazza');
|
||||
INSERT INTO groupmembers (gid, uid) VALUES (4, 1), (4, 2);
|
||||
|
||||
# Create the "hosts" group for the initial community.
|
||||
# (GID 5)
|
||||
INSERT INTO groups (gid, groupname) VALUES (5, 'Hosts:piazza');
|
||||
INSERT INTO groupmembers (gid, uid) VALUES (5, 2);
|
||||
|
||||
# Create the ACL for the initial community members group. Only the community hosts and
|
||||
# system administrators can add or remove members (without going through the "join" process).
|
||||
# (ACL 3, ACEs 4 and 5)
|
||||
INSERT INTO acl (aclid, aclname) VALUES (3, 'Members:piazza');
|
||||
INSERT INTO aclowner (aclid, ownerid, flags) VALUES (3, 2, 0);
|
||||
INSERT INTO ace (aceid, pri, flags) VALUES (4, 5, 1);
|
||||
INSERT INTO acldata (aclid, seq, aceid) VALUES (3, 0, 4);
|
||||
INSERT INTO acedata (aceid, perm_nsid, perm_name) VALUES
|
||||
(4, 4, 'add.member' ),
|
||||
(4, 4, 'remove.member');
|
||||
INSERT INTO ace (aceid, pri, flags) VALUES (5, 1, 1);
|
||||
INSERT INTO acldata (aclid, seq, aceid) VALUES (3, 1, 5);
|
||||
INSERT INTO acedata (aceid, perm_nsid, perm_name) VALUES
|
||||
(5, 4, 'add.member' ),
|
||||
(5, 4, 'remove.member');
|
||||
UPDATE groups SET gaclid = 3 WHERE gid = 4;
|
||||
|
||||
# Create the ACL for the initial community hosts group. Only the community "main host"
|
||||
# and system administrators can add or remove members.
|
||||
# (ACL 4, ACEs 6 and 7)
|
||||
INSERT INTO acl (aclid, aclname) VALUES (4, 'Hosts:piazza');
|
||||
INSERT INTO aclowner (aclid, ownerid, flags) VALUES (4, 2, 0);
|
||||
INSERT INTO ace (aceid, pri, flags) VALUES (6, 2, 0);
|
||||
INSERT INTO acldata (aclid, seq, aceid) VALUES (4, 0, 6);
|
||||
INSERT INTO acedata (aceid, perm_nsid, perm_name) VALUES
|
||||
(6, 4, 'add.member' ),
|
||||
(6, 4, 'remove.member');
|
||||
INSERT INTO ace (aceid, pri, flags) VALUES (7, 1, 1);
|
||||
INSERT INTO acldata (aclid, seq, aceid) VALUES (4, 1, 7);
|
||||
INSERT INTO acedata (aceid, perm_nsid, perm_name) VALUES
|
||||
(7, 4, 'add.member' ),
|
||||
(7, 4, 'remove.member');
|
||||
UPDATE groups SET gaclid = 4 WHERE gid = 5;
|
||||
|
||||
# Create the ACL for the initial community.
|
||||
# (ACL 5, ACEs 8, 9)
|
||||
INSERT INTO acl (aclid, aclname) VALUES (5, 'ACL:piazza');
|
||||
INSERT INTO aclowner (aclid, ownerid, flags) VALUES (5, 5, 1);
|
||||
INSERT INTO ace (aceid, pri, flags) VALUES (8, 2, 0);
|
||||
INSERT INTO acldata (aclid, seq, aceid) VALUES (5, 0, 8);
|
||||
INSERT INTO acedata (aceid, perm_nsid, perm_name) VALUES
|
||||
(8, 15, 'remove.property');
|
||||
INSERT INTO ace (aceid, pri, flags) VALUES (9, 5, 1);
|
||||
INSERT INTO acldata (aclid, seq, aceid) VALUES (5, 1, 9);
|
||||
INSERT INTO acedata (aceid, perm_nsid, perm_name) VALUES
|
||||
(9, 14, 'grant.revoke.access'),
|
||||
(9, 15, 'set.category' ),
|
||||
(9, 15, 'set.visibility' ),
|
||||
(9, 15, 'set.name' ),
|
||||
(9, 15, 'set.alias' ),
|
||||
(9, 15, 'set.property' );
|
||||
|
||||
#### following this line is initialization of Venice-specific tables ####
|
||||
|
||||
# Populate the Category table.
|
||||
@@ -1005,6 +1075,22 @@ INSERT INTO refcategory (catid, parent, symlink, name) VALUES
|
||||
|
||||
UPDATE refcategory SET dontuse = 1 WHERE catid = 15;
|
||||
|
||||
# Create the initial community entry.
|
||||
# (CID 1)
|
||||
INSERT INTO communities (cid, member_gid, host_gid, host_uid, aclid, name, alias, createdate)
|
||||
VALUES (1, 4, 5, 2, 5, 'La Piazza', 'piazza', '05-27-2003 09:00:00');
|
||||
|
||||
# Create the properties for the initial community.
|
||||
INSERT INTO commprops (cid, nsid, prop_name, prop_value) VALUES
|
||||
(1, 15, 'synopsis', '!A gathering place for Venice users.' ),
|
||||
(1, 15, 'rules', '!Please treat one another with courtesy and respect.'),
|
||||
(1, 15, 'language', '_LANG:en-US' ),
|
||||
(1, 15, 'locality', '!Anywhere' ),
|
||||
(1, 15, 'region', '!XX' ),
|
||||
(1, 15, 'postal.code', '!00000' ),
|
||||
(1, 15, 'country', '_CTRY:US' ),
|
||||
(1, 15, 'url.homepage', '!http://venice.sourceforge.net' );
|
||||
|
||||
# Create the "global" menu. (ID #1)
|
||||
INSERT INTO menus (menuid, menu_nsid, menu_name, title, subtitle)
|
||||
VALUES (1, 1, 'fixed.menu', 'About This Site', NULL);
|
||||
|
||||
Reference in New Issue
Block a user