docs/poweradmin-pgsql-db-structure.sql
changeset 118 839a18931017
parent 113 e7a448dba024
equal deleted inserted replaced
117:04cf478997f2 118:839a18931017
    15   id SERIAL PRIMARY KEY,
    15   id SERIAL PRIMARY KEY,
    16   name varchar(64) NOT NULL,
    16   name varchar(64) NOT NULL,
    17   descr text NOT NULL
    17   descr text NOT NULL
    18 );
    18 );
    19 
    19 
    20 INSERT INTO perm_items (name, descr) VALUES ('user_is_ueberuser','User has full access. God-like. Redeemer.'),('zone_master_add','User is allowed to add new master zones.'),('zone_slave_add','User is allowed to add new slave zones.'),('zone_content_view_own','User is allowed to see the content and meta data of zones he owns.'),('zone_content_edit_own','User is allowed to edit the content of zones he owns.'),('zone_meta_edit_own','User is allowed to edit the meta data of zones he owns.'),('zone_content_view_others','User is allowed to see the content and meta data of zones he does not own.'),('zone_content_edit_others','User is allowed to edit the content of zones he does not own.'),('zone_meta_edit_others','User is allowed to edit the meta data of zones he does not own.'),('search','User is allowed to perform searches.'),('supermaster_view','User is allowed to view supermasters.'),('supermaster_add','User is allowed to add new supermasters.'),('supermaster_edit','User is allowed to edit supermasters.'),('user_view_others','User is allowed to see other users and their details.'),('user_add_new','User is allowed to add new users.'),('user_edit_own','User is allowed to edit their own details.'),('user_edit_others','User is allowed to edit other users.'),('user_passwd_edit_others','User is allowed to edit the password of other users.'),('user_edit_templ_perm','User is allowed to change the permission template that is assigned to a user.'),('templ_perm_add','User is allowed to add new permission templates.'),('templ_perm_edit','User is allowed to edit existing permission templates.');
    20 INSERT INTO perm_items (name, descr) VALUES ('user_is_ueberuser','User has full access. God-like. Redeemer.');
       
    21 INSERT INTO perm_items (name, descr) VALUES ('zone_master_add','User is allowed to add new master zones.');
       
    22 INSERT INTO perm_items (name, descr) VALUES ('zone_slave_add','User is allowed to add new slave zones.');
       
    23 INSERT INTO perm_items (name, descr) VALUES ('zone_content_view_own','User is allowed to see the content and meta data of zones he owns.');
       
    24 INSERT INTO perm_items (name, descr) VALUES ('zone_content_edit_own','User is allowed to edit the content of zones he owns.');
       
    25 INSERT INTO perm_items (name, descr) VALUES ('zone_meta_edit_own','User is allowed to edit the meta data of zones he owns.');
       
    26 INSERT INTO perm_items (name, descr) VALUES ('zone_content_view_others','User is allowed to see the content and meta data of zones he does not own.');
       
    27 INSERT INTO perm_items (name, descr) VALUES ('zone_content_edit_others','User is allowed to edit the content of zones he does not own.');
       
    28 INSERT INTO perm_items (name, descr) VALUES ('zone_meta_edit_others','User is allowed to edit the meta data of zones he does not own.');
       
    29 INSERT INTO perm_items (name, descr) VALUES ('search','User is allowed to perform searches.');
       
    30 INSERT INTO perm_items (name, descr) VALUES ('supermaster_view','User is allowed to view supermasters.');
       
    31 INSERT INTO perm_items (name, descr) VALUES ('supermaster_add','User is allowed to add new supermasters.');
       
    32 INSERT INTO perm_items (name, descr) VALUES ('supermaster_edit','User is allowed to edit supermasters.');
       
    33 INSERT INTO perm_items (name, descr) VALUES ('user_view_others','User is allowed to see other users and their details.');
       
    34 INSERT INTO perm_items (name, descr) VALUES ('user_add_new','User is allowed to add new users.');
       
    35 INSERT INTO perm_items (name, descr) VALUES ('user_edit_own','User is allowed to edit their own details.');
       
    36 INSERT INTO perm_items (name, descr) VALUES ('user_edit_others','User is allowed to edit other users.');
       
    37 INSERT INTO perm_items (name, descr) VALUES ('user_passwd_edit_others','User is allowed to edit the password of other users.');
       
    38 INSERT INTO perm_items (name, descr) VALUES ('user_edit_templ_perm','User is allowed to change the permission template that is assigned to a user.');
       
    39 INSERT INTO perm_items (name, descr) VALUES ('templ_perm_add','User is allowed to add new permission templates.');
       
    40 INSERT INTO perm_items (name, descr) VALUES ('templ_perm_edit','User is allowed to edit existing permission templates.');
    21 
    41 
    22 CREATE TABLE perm_templ (
    42 CREATE TABLE perm_templ (
    23   id SERIAL PRIMARY KEY,
    43   id SERIAL PRIMARY KEY,
    24   name varchar(128) NOT NULL,
    44   name varchar(128) NOT NULL,
    25   descr text NOT NULL
    45   descr text NOT NULL
    39   id SERIAL PRIMARY KEY,
    59   id SERIAL PRIMARY KEY,
    40   domain_id integer default 0,
    60   domain_id integer default 0,
    41   owner integer default 0,
    61   owner integer default 0,
    42   comment text
    62   comment text
    43 );
    63 );
       
    64 
       
    65 CREATE INDEX zone_domain_owner ON zones(domain_id, owner);