2 id SERIAL NOT NULL PRIMARY KEY,
3 name VARCHAR(64) NOT NULL,
4 description VARCHAR(255) NOT NULL,
5 parent INTEGER REFERENCES objects(id),
7 UNIQUE ( name, parent )
10 CREATE TABLE aclentries (
11 object INTEGER NOT NULL REFERENCES objects(id),
12 entity_type VARCHAR(5) NOT NULL CHECK ( entity_type IN ('group', 'user') ),
13 entity VARCHAR(64) NOT NULL,
14 allow VARCHAR(5) NOT NULL CHECK ( allow IN ('grant', 'deny') ),
16 UNIQUE ( object, entity_type, entity )
18 CREATE INDEX object_index ON aclentries ( object );