Changeset 849

Show
Ignore:
Timestamp:
03/12/03 20:06:08 (22 years ago)
Author:
jalet
Message:

Initial support for groups added.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/initscripts/pykota-postgresql.sql

    r812 r849  
    1414-- 
    1515-- $Log$ 
     16-- Revision 1.5  2003/03/12 19:06:08  jalet 
     17-- Initial support for groups added. 
     18-- 
    1619-- Revision 1.4  2003/02/27 08:40:14  jalet 
    1720-- DATETIME is not supported anymore in PostgreSQL 7.3 it seems, but 
     
    9194                         groupid INT4 REFERENCES groups(id), 
    9295                         printerid INT4 REFERENCES printers(id), 
    93                          lifepagecounter INT4 DEFAULT 0, 
    94                          pagecounter INT4 DEFAULT 0, 
    9596                         softlimit INT4, 
    9697                         hardlimit INT4, 
    9798                         datelimit TIMESTAMP); 
    9899                         
     100--                          
     101-- Create the groups/members relationship 
     102-- 
     103CREATE TABLE groupsmembers(groupid INT4 REFERENCES groups(id), 
     104                           userid INT4 REFERENCES users(id), 
     105                           PRIMARY KEY (groupid, userid)); 
     106 
    99107--                         
    100108-- Set some ACLs                         
    101109-- 
    102 REVOKE ALL ON users, groups, printers, userpquota, grouppquota FROM public;                         
    103 GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON users, groups, printers, userpquota, grouppquota TO pykotaadmin; 
     110REVOKE ALL ON users, groups, printers, userpquota, grouppquota, groupsmembers FROM public;                         
     111GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON users, groups, printers, userpquota, grouppquota, groupsmembers TO pykotaadmin; 
    104112GRANT SELECT, UPDATE ON users_id_seq, groups_id_seq, printers_id_seq, userpquota_id_seq, grouppquota_id_seq TO pykotaadmin; 
    105113GRANT SELECT, UPDATE ON printers, userpquota, grouppquota TO pykotauser; 
    106 GRANT SELECT ON users, groups TO pykotauser; 
     114GRANT SELECT ON users, groups, groupsmembers TO pykotauser; 
    107115