Show
Ignore:
Timestamp:
12/27/03 17:49:25 (21 years ago)
Author:
uid67467
Message:

Should be ok now.

Location:
pykota/trunk/initscripts
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/initscripts/ldap/pykota.schema

    r1223 r1240  
    189189        DESC 'PyKota Printer' 
    190190        MUST ( cn ) 
    191         MAY  ( pykotaPrinterName $ pykotaPricePerPage $ pykotaPricePerJob ) ) 
     191        MAY  ( pykotaPrinterName $ pykotaPricePerPage $ pykotaPricePerJob $ uniqueMember ) ) 
    192192         
    193193# pykotaUserPQuota         
  • pykota/trunk/initscripts/postgresql/pykota-postgresql.sql

    r1203 r1240  
    2020-- 
    2121-- $Log$ 
     22-- Revision 1.7  2003/12/27 16:49:25  uid67467 
     23-- Should be ok now. 
     24-- 
    2225-- Revision 1.6  2003/11/23 19:01:36  jalet 
    2326-- Job price added to history 
     
    110113CREATE TABLE jobhistory(id SERIAL PRIMARY KEY NOT NULL, 
    111114                        jobid TEXT, 
    112                         userid INT4 REFERENCES users(id), 
    113                         printerid INT4 REFERENCES printers(id), 
     115                        userid INT4, 
     116                        printerid INT4, 
    114117                        pagecounter INT4 DEFAULT 0, 
    115118                        jobsize INT4, 
     
    120123                        copies INT4, 
    121124                        options TEXT, 
    122                         jobdate TIMESTAMP DEFAULT now()); 
     125                        jobdate TIMESTAMP DEFAULT now(), 
     126                        CONSTRAINT checkUserPQuota FOREIGN KEY (userid, printerid) REFERENCES userpquota(userid, printerid)); 
    123127CREATE INDEX jobhistory_p_id_ix ON jobhistory (printerid); 
    124128CREATE INDEX jobhistory_pd_id_ix ON jobhistory (printerid, jobdate); 
     
    141145                           userid INT4 REFERENCES users(id), 
    142146                           PRIMARY KEY (groupid, userid)); 
     147                            
     148--                          
     149-- Create the printer groups relationship 
     150-- 
     151CREATE TABLE printergroupsmembers(groupid INT4 REFERENCES printers(id), 
     152                           printerid INT4 REFERENCES printers(id), 
     153                           PRIMARY KEY (groupid, printerid)); 
    143154 
    144155--                         
    145156-- Set some ACLs                         
    146157-- 
    147 REVOKE ALL ON users, groups, printers, userpquota, grouppquota, groupsmembers, jobhistory FROM public;                         
     158REVOKE ALL ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory FROM public;                         
    148159REVOKE ALL ON users_id_seq, groups_id_seq, printers_id_seq, userpquota_id_seq, grouppquota_id_seq, jobhistory_id_seq FROM public; 
    149160 
    150 GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON users, groups, printers, userpquota, grouppquota, groupsmembers, jobhistory TO pykotaadmin; 
     161GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory TO pykotaadmin; 
    151162GRANT SELECT, UPDATE ON users_id_seq, groups_id_seq, printers_id_seq, userpquota_id_seq, grouppquota_id_seq, jobhistory_id_seq TO pykotaadmin; 
    152 GRANT SELECT ON users, groups, printers, userpquota, grouppquota, groupsmembers, jobhistory TO pykotauser; 
     163GRANT SELECT ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory TO pykotauser; 
    153164 
  • pykota/trunk/initscripts/postgresql/upgrade-to-1.16.sql

    r1203 r1240  
    2020-- 
    2121-- $Log$ 
     22-- Revision 1.3  2003/12/27 16:49:25  uid67467 
     23-- Should be ok now. 
     24-- 
    2225-- Revision 1.2  2003/11/23 19:01:36  jalet 
    2326-- Job price added to history 
     
    4851ALTER TABLE jobhistory ADD COLUMN options TEXT; 
    4952 
     53-- 
     54-- Remove bad integrity rules 
     55-- and replace them with a new one 
     56-- 
     57ALTER TABLE jobhistory DROP CONSTRAINT "$1"; 
     58ALTER TABLE jobhistory DROP CONSTRAINT "$2"; 
     59ALTER TABLE jobhistory ADD CONSTRAINT checkUserPQuota FOREIGN KEY (userid, printerid) REFERENCES userpquota (userid, printerid); 
     60 
     61--  
     62-- Add new tables 
     63-- 
     64--                          
     65-- Create the printer groups relationship 
     66-- 
     67CREATE TABLE printergroupsmembers(groupid INT4 REFERENCES printers(id), 
     68                           printerid INT4 REFERENCES printers(id), 
     69                           PRIMARY KEY (groupid, printerid)); 
     70 
    5071--                          
    5172-- Now add some indexes 
     
    5677CREATE UNIQUE INDEX grouppquota_up_id_ix ON grouppquota (groupid, printerid); 
    5778 
     79--  
     80-- And now sets some ACLs 
     81--  
     82REVOKE ALL ON printergroupsmembers FROM public;                         
     83GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON printergroupsmembers TO pykotaadmin; 
     84GRANT SELECT ON printergroupsmembers TO pykotauser; 
     85