From 5a218e3feb7fae5e3699e82bb3ab8fc370293c57 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Mon, 3 Feb 2003 03:32:11 +0000 Subject: [PATCH] Changed page privileges to a more intuitive system. --- docs/credits.txt | 1 + docs/upgrades/upgrade_5.0.3-5.1.0.sql | 18 +++++- lib/WebGUI/Operation/Account.pm | 2 +- lib/WebGUI/Operation/Package.pm | 18 ++---- lib/WebGUI/Operation/Page.pm | 81 +++++++++------------------ lib/WebGUI/Privilege.pm | 25 +++------ 6 files changed, 55 insertions(+), 90 deletions(-) diff --git a/docs/credits.txt b/docs/credits.txt index ccda9356b..746425f21 100644 --- a/docs/credits.txt +++ b/docs/credits.txt @@ -15,6 +15,7 @@ Contributing Developers..............Peter Beardsley / Appropriate Solutions, In Jeff Depons / Web Den Interactive Frank Dillon / Web Den Interactive Junying Du / Web Den Interactive + Ed Van Duinen / UNC Greg Fast / Web Den Interactive Chris Gebhardt / OpenServe Andy Grundman diff --git a/docs/upgrades/upgrade_5.0.3-5.1.0.sql b/docs/upgrades/upgrade_5.0.3-5.1.0.sql index 4d50cc44a..4cdcea6fa 100644 --- a/docs/upgrades/upgrade_5.0.3-5.1.0.sql +++ b/docs/upgrades/upgrade_5.0.3-5.1.0.sql @@ -55,8 +55,22 @@ insert into international (internationalId,languageId,namespace,message,lastUpda insert into international (internationalId,languageId,namespace,message,lastUpdated) values (869,1,'WebGUI','Welcome Message', 1044138730); insert into international (internationalId,languageId,namespace,message,lastUpdated) values (868,1,'WebGUI','Send welcome message?', 1044138691); insert into international (internationalId,languageId,namespace,message,lastUpdated) values (870,1,'WebGUI','Welcome', 1044139461); - - +insert into international (internationalId,languageId,namespace,message,lastUpdated) values (872,1,'WebGUI','Who can view?', 1044218038); +insert into international (internationalId,languageId,namespace,message,lastUpdated) values (871,1,'WebGUI','Who can edit?', 1044218026); +alter table page add groupIdView int(11) not null default 3; +alter table page add groupIdEdit int(11) not null default 3; +update page set groupIdEdit = groupId where groupEdit = 1; +update page set groupIdEdit = 3 where groupEdit = 0; +update page set groupIdView = 7 where worldView = 1; +update page set groupIdView = groupId where worldView = 0 and (groupView = 1 OR groupEdit = 1); +update page set groupIdView = 3 where worldView = 0 and groupView = 0 and groupEdit = 0; +alter table page drop column groupId; +alter table page drop column groupView; +alter table page drop column groupEdit; +alter table page drop column worldView; +alter table page drop column worldEdit; +alter table page drop column ownerView; +alter table page drop column ownerEdit; diff --git a/lib/WebGUI/Operation/Account.pm b/lib/WebGUI/Operation/Account.pm index ef1fbef90..7eb24f1db 100644 --- a/lib/WebGUI/Operation/Account.pm +++ b/lib/WebGUI/Operation/Account.pm @@ -36,7 +36,7 @@ our @EXPORT = qw(&www_viewMessageLogMessage &www_viewMessageLog &www_viewProfile sub _accountOptions { my ($output); $output = '