head	1.5;
access;
symbols;
locks; strict;
comment	@# @;


1.5
date	2001.06.15.17.11.19;	author leonardr;	state Exp;
branches;
next	1.4;

1.4
date	2001.05.11.19.38.56;	author leonardr;	state Exp;
branches;
next	1.3;

1.3
date	2001.05.04.21.45.29;	author dlr;	state Exp;
branches;
next	1.2;

1.2
date	2001.05.02.08.19.21;	author dlr;	state Exp;
branches;
next	1.1;

1.1
date	2001.05.02.06.35.47;	author dlr;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Added code to handle the default fractional size of TableTrackingBufferCaches as host attributes.
@
text
@#
# Populate role attribute values.
#
DROP TABLE IF EXISTS xxxx_populate_AttributeValue;
CREATE TABLE xxxx_populate_AttributeValue
(
  ENTITY     varchar(255) NOT NULL,
  ROLE       varchar(255) NOT NULL,
  ATTRIBUTE  varchar(255) NOT NULL,
  VALUE      varchar(255) NOT NULL
);

INSERT INTO xxxx_populate_AttributeValue 
     (ROLE, ATTRIBUTE, VALUE) 
VALUES
  ("Observer", "requestable", "Y")
 ,("Developer", "requestable", "Y")
 ,("Content Developer", "requestable", "Y")
 ,("Project Owner", "requestable", "Y")

 ,("Project Owner", "denotesOwnership", "Y")
 ,("Domain Admin", "denotesOwnership", "Y")
 ,("Host Admin", "denotesOwnership", "Y")

 ,("Project Owner", "grantOnProjectCreation", "Y")

 ,("Anonymous Guest", "blockRecursionIntoPrivateProjects", "Y")
 ,("Click-through Viewer", "blockRecursionIntoPrivateProjects", "Y")
 ,("Registered User", "blockRecursionIntoPrivateProjects", "Y")
;

INSERT INTO HELM_ATTRIBUTE_VALUE
 SELECT HELM_ROLE.ROLE_ID, HELM_ATTRIBUTE.ATTRIBUTE_ID, VALUE
  FROM xxxx_populate_AttributeValue, HELM_ROLE, HELM_ATTRIBUTE
   where HELM_ROLE.NAME = xxxx_populate_AttributeValue.ROLE
     and HELM_ATTRIBUTE.ENTITY_TYPE = 'Role'
     and HELM_ATTRIBUTE.NAME = xxxx_populate_AttributeValue.ATTRIBUTE
;
 
DROP TABLE xxxx_populate_AttributeValue;


#
# Populate host attribute values.
INSERT INTO HELM_ATTRIBUTE_VALUE (ATTRIBUTE_ID, ENTITY_ID, VALUE)
 SELECT ATTRIBUTE_ID,
        PROJECT_ID,
        DEFAULT_VALUE
  FROM HELM_ATTRIBUTE, HELM_PROJECT where HELM_PROJECT.TYPE='host' and
	HELM_ATTRIBUTE.ENTITY_TYPE='Host'
;
@


1.4
log
@A Heartbreaking Patch of Staggering Genius: adds capacity (but no interface) for deeply nested projects, categories, and project groups. As a side effect, gets rid of the hacky special 'all public projects in domain' group. There are probably bugs in this, and some of those bugs are probably security holes, so watch out.
@
text
@a44 18
#
DROP TABLE IF EXISTS xxxx_entity;
DROP TABLE IF EXISTS xxxx_attribute;

CREATE TABLE xxxx_entity (ENTITY_ID integer);
CREATE TABLE xxxx_attribute (ATTRIBUTE_ID integer);

INSERT INTO xxxx_entity
 SELECT PROJECT_ID FROM HELM_PROJECT WHERE NAME='**All projects on host'
;

INSERT INTO xxxx_attribute
 SELECT ATTRIBUTE_ID
  FROM  HELM_ATTRIBUTE
  WHERE HELM_ATTRIBUTE.ENTITY_TYPE='Host'
    AND HELM_ATTRIBUTE.NAME='maxUploadSize'
;

d46 5
a50 4
 SELECT xxxx_attribute.ATTRIBUTE_ID,
        xxxx_entity.ENTITY_ID,
        '26214400'
  FROM xxxx_attribute, xxxx_entity
a51 3

DROP TABLE xxxx_attribute;
DROP TABLE xxxx_entity;
@


1.3
log
@* Correctly employed ENTITY_TYPE field for role attribute value
population.

* Added host attribute value population.
@
text
@d26 4
@


1.2
log
@Removed ENTITY_TYPE column from HELM_ATTRIBUTE_VALUE table.
@
text
@d1 3
d7 1
d32 1
d37 31
@


1.1
log
@Role-specific table refactored to be more general purpose.  Still adds
Role-specific data.
@
text
@d25 1
a25 1
 SELECT HELM_ROLE.ROLE_ID, HELM_ATTRIBUTE.ATTRIBUTE_ID, 'Role', VALUE
@

