Changeset 3213


Ignore:
Timestamp:
07/31/13 09:42:56 (11 years ago)
Author:
olhsha
Message:

permissions added to the DB creation script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/sql/DashishAnnotatorCreate.sql

    r3212 r3213  
    6565
    6666
     67
    6768------------------------------------------------------------------------
    6869-- <xs:complexType name="Annotation">
     
    191192);
    192193
     194-------------------------------------------------------------------------------
     195--------------------------------------------------------------------------------------------
     196--  <xs:simpleType name="Permission">
     197--         <xs:restriction base="xs:string">
     198--             <xs:enumeration value="owner"/>
     199--             <xs:enumeration value="reader"/>
     200--             <xs:enumeration value="writer"/>
     201--         </xs:restriction>
     202--     </xs:simpleType>
     203
     204
     205--     <xs:complexType name="UserWithPermission">
     206--         <xs:complexContent>
     207--             <xs:extension base="ResourceREF">
     208--                 <xs:attribute name="permission" type="Permission" use="required"/>
     209--             </xs:extension>
     210--         </xs:complexContent>
     211--     </xs:complexType>
     212
     213
     214--     <xs:complexType name="PermissionList">
     215--         <xs:sequence>
     216--             <xs:element name="user" type="UserWithPermission" minOccurs="1" maxOccurs="unbounded"/>
     217--         </xs:sequence>
     218--         <xs:attribute name="URI" type="xs:anyURI" use="required"/>
     219--     </xs:complexType>
     220
     221CREATE TABLE annotations_users_permissions (
     222annotation_id integer REFERENCES annotation(annotation_id),
     223principal_id integer REFERENCES principal(principal_id),
     224permission_  text,
     225unique(annotation_id, principal_id),
     226CHECK(permission_ = 'reader' OR permission_='writer' OR permission_='owner')
     227)
    193228
    194229---------------------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.