head	1.3;
access;
symbols
	TIGRIS_1_1_0RC2:1.3
	TIGRIS_1_1_0RC1:1.3
	TIGRIS_1_1:1.3.0.4
	TIGRIS_1_0_8:1.3
	TIGRIS_1_0_8RC3:1.3
	TIGRIS_1_0_8RC2:1.3
	TIGRIS_1_0_8RC1:1.3
	TIGRIS_1_0_7:1.3
	TIGRIS_1_0_7RC3:1.3
	TIGRIS_1_0_7RC2:1.3
	TIGRIS_1_0_7RC1:1.3
	TIGRIS_1_0_6:1.3
	TIGRIS_1_0_6RC5:1.3
	TIGRIS_1_0_6RC4:1.3
	TIGRIS_1_0_6RC3:1.3
	TIGRIS_1_0_6RC2:1.3
	TIGRIS_1_0_6RC1:1.3
	TIGRIS_1_0_5:1.3
	TIGRIS_1_0_5RC6:1.3
	TIGRIS_1_0_5RC5:1.3
	TIGRIS_1_0_5RC4:1.3
	TIGRIS_1_0_5RC3:1.3
	TIGRIS_1_0_5RC2:1.3
	TIGRIS_1_0_5RC1:1.3
	TIGRIS_1_0_4:1.3
	TIGRIS_1_0_3:1.3
	TIGRIS_1_0_2:1.3
	TIGRIS_1_0_1:1.3
	TIGRIS_1_0:1.3.0.6
	TIGRIS_1_0_0:1.3
	TIGRIS_1_0_0_RC1:1.3.0.2;
locks; strict;
comment	@# @;


1.3
date	2001.03.23.00.03.08;	author leonardr;	state Exp;
branches;
next	1.2;

1.2
date	2001.03.21.01.57.32;	author leonardr;	state Exp;
branches;
next	1.1;

1.1
date	2001.03.21.00.39.25;	author leonardr;	state Exp;
branches;
next	;


desc
@@


1.3
log
@BroadcastMessage now requires Domain - Administrate, and there are now roles that actually have that permission.
@
text
@#Actions lost to roles. 
select 
 "delete from HELM_ROLE_ACTION_RESOURCE where ACTION_ID = ", 
 ACTION_ID, 
 ";" 
from HELM_ACTION where 
 HELM_ACTION.NAME = "Project News - Add";

#Actions gained by roles.

insert into HELM_ROLE_ACTION_RESOURCE (ROLE_ID, ACTION_ID, RESOURCE_ID)
       select  Role.roleID, HELM_ACTION.ACTION_ID, HELM_RESOURCE.RESOURCE_ID
         from  Role, HELM_ACTION, HELM_RESOURCE
         where HELM_RESOURCE.DESCRIPTION in ("All applicable resources")
           and (
                (Role.name="Registered User" and HELM_ACTION.NAME in 
                 ("Project Document - View"))
	        or
		(Role.name="Anonymous Guest" and HELM_ACTION.NAME in 
		  ("Domain Page - View"
		  ,"DomainProjects - View"
		  ,"DomainProjectCategories - View"
		  ,"DomainSpotlight - View"
		  ,"Mailing List - List"
		  ,"Mailing List - View"
		  ,"Project - View"
		  ,"Project Content - View"
		  ,"Project Document - View"
		  ,"Project Download - View"
		  ,"Project Issue Tracking - Query"
		  ,"Project Issue Tracking - Submit"
		  ,"Project Member - List"
		  ,"Project News - View"
		  ,"Project Page - View"
		  ,"SearchResults - View"
		  ,"User - Add"
		  ,"Domain News - View"
		  ,"VersionControl - Update"
		  ,"VersionControl - Diff"
		  ,"VersionControl - History"
		  ,"VersionControl - Logs"
		  )
		 )
	        or
		(Role.name="Observer" and HELM_ACTION.NAME in 
		  ("Project Document - View"
		  ,"Project Document - View"
		  ,"Project Role - Revoke - Self"
		  ,"Project News - Suggest"
		  )
		 )
	        or
		(Role.name="Content Developer" and HELM_ACTION.NAME in 
 		  ("Project Document - View"
		  ,"Project Role - Revoke - Self"
		  ,"Project News - Suggest"))
	        or
		(Role.name="Developer" and HELM_ACTION.NAME in 
		  ("Project Document - View"
		  ,"Project Role - Revoke - Self"
		  ,"Project News - Suggest"
		  ,"VersionControl - Status"))
	        or
		(Role.name="Project Owner" and HELM_ACTION.NAME in 
		("Project - Audit Log - View"
		 ,"Project Document - Delete"
		 ,"Project Document - Edit"
		 ,"Project Document - View"
		 ,"Project Role - Revoke - Self"
		 ,"Project News - Suggest"
		 ,"Project News - Approve"
		 ,"VersionControl - Status"
		))
	        or
		(Role.name="Domain Admin" and HELM_ACTION.NAME in 
		  ("Domain - Audit Log - View"
		   ,"Project - Audit Log - View"
		   ,"Project Document - Delete"
		   ,"Project Document - Edit"
		   ,"Project Document - View"
		   ,"Project Role - Revoke - Self"
		   ,"Project News - Suggest"
		   ,"Project News - Approve"
		   ,"Resource - Add"
		   ,"Resource - Edit"
		   ,"Project Role - Add"
		   ,"Project Role - Edit"
		   ,"Project Role - Delete"
		   ,"Domain Role - Add"
		   ,"Domain Role - Edit"
		   ,"Domain Role - Delete"
		   ,"VersionControl - Status"		
		))
	        or
		(Role.name="Host Admin" and HELM_ACTION.NAME in 
		("Domain - Audit Log - View"
		 ,"Helm - Administer"
		 ,"Host - Audit Log - View"
		 ,"Project - Audit Log - View"
		 ,"Project Document - Delete"
		 ,"Project Document - Edit"
		 ,"Project Document - View"
		 ,"Project Role - Revoke - Self"
		 ,"Project News - Suggest"
		 ,"Project News - Approve"
		 ,"Resource - Add"
		 ,"Resource - Edit"
		 ,"Project Role - Add"
		 ,"Project Role - Edit"
		 ,"Project Role - Delete"
		 ,"Domain Role - Add"
		 ,"Domain Role - Edit"
		 ,"Domain Role - Delete"
		 ,"Host Role - Add"
		 ,"Host Role - Edit"
		 ,"Host Role - Delete"
		 ,"VersionControl - Status"
		)))
;

insert into HELM_ROLE_ACTION_RESOURCE (ROLE_ID, ACTION_ID, RESOURCE_ID)
       select  Role.roleID, HELM_ACTION.ACTION_ID, HELM_RESOURCE.RESOURCE_ID
         from  Role, HELM_ACTION, HELM_RESOURCE
         where HELM_RESOURCE.DESCRIPTION in ("All web pages")
           and (Role.name="Content Developer" and HELM_ACTION.NAME in
		("VersionControl - Status"))
;
@


1.2
log
@SQL scripts actually run all the way through now.
@
text
@a8 9
select 
 "delete from HELM_ROLE_ACTION_RESOURCE where ROLE_ID = ", 
 roleID, 
 " and ACTION_ID = ", 
 ACTION_ID, 
 ";" 
from HELM_ACTION, Role where 
 Role.NAME="Content Developer" and HELM_ACTION.NAME = "Project News - Add";

@


1.1
log
@Added data migration scripts.
@
text
@d2 6
a7 1
select "delete from HELM_ROLE_ACTION_RESOURCE where ACTION_ID = ", ACTION_ID, ";" from HELM_ACTION where (HELM_ACTION.NAME = "Project News - Add");
d9 8
a16 1
select "delete from HELM_ROLE_ACTION_RESOURCE where ROLE_ID = ", ROLE_ID ACTION_ID = ", ACTION_ID, ";" from HELM_ACTION, HELM_ROLE where HELM_ROLE.NAME="Content Developer" and HELM_ACTION.NAME = "Project News - Add";
d21 2
a22 2
       select  HELM_ROLE.ROLE_ID, HELM_ACTION.ACTION_ID, HELM_RESOURCE.RESOURCE_ID
         from  HELM_ROLE, HELM_ACTION, HELM_RESOURCE
d25 1
a25 1
                (HELM_ROLE.NAME="Registered User" and HELM_ACTION.NAME in 
d28 1
a28 1
		(HELM_ROLE.NAME="Anonymous Guest" and HELM_ACTION.NAME in 
d54 1
a54 1
		(HELM_ROLE.NAME="Observer" and HELM_ACTION.NAME in 
d62 1
a62 1
		(HELM_ROLE.NAME="Content Developer" and HELM_ACTION.NAME in 
d67 1
a67 1
		(HELM_ROLE.NAME="Developer" and HELM_ACTION.NAME in 
d73 1
a73 1
		(HELM_ROLE.NAME="Project Owner" and HELM_ACTION.NAME in 
d84 1
a84 1
		(HELM_ROLE.NAME="Domain Admin" and HELM_ACTION.NAME in 
d104 1
a104 1
		(HELM_ROLE.NAME="Host Admin" and HELM_ACTION.NAME in 
d131 2
a132 2
       select  HELM_ROLE.ROLE_ID, HELM_ACTION.ACTION_ID, HELM_RESOURCE.RESOURCE_ID
         from  HELM_ROLE, HELM_ACTION, HELM_RESOURCE
d134 2
a135 2
           and (HELM_ROLE.NAME="Content Developer" and HELM_ACTION.NAME in
		("VersionControl - Status")
@

