pgsql/set-permissions.py
branchv0.6.x
changeset 558 2fcf12fdecc2
parent 556 fbbb16476c5b
child 644 d879f915c1c5
child 703 58815c004a61
equal deleted inserted replaced
557:1498abbb6c91 558:2fcf12fdecc2
    91     dbc.execute('GRANT SELECT ON domain_data, domain_name, mailboxformat, '
    91     dbc.execute('GRANT SELECT ON domain_data, domain_name, mailboxformat, '
    92                 'maillocation, quotalimit, service_set, users TO %s' % dovecot)
    92                 'maillocation, quotalimit, service_set, users TO %s' % dovecot)
    93     dbc.execute('GRANT SELECT, INSERT, UPDATE, DELETE ON %s TO %s' %
    93     dbc.execute('GRANT SELECT, INSERT, UPDATE, DELETE ON %s TO %s' %
    94                 (dc_rw, dovecot))
    94                 (dc_rw, dovecot))
    95     dbc.execute('GRANT SELECT ON alias, catchall, domain_data, domain_name, '
    95     dbc.execute('GRANT SELECT ON alias, catchall, domain_data, domain_name, '
    96                 'maillocation, relocated, transport, users TO %s' % postfix)
    96                 'maillocation, postfix_gid, relocated, transport, users TO %s'
       
    97                 % postfix)
    97     dbc.close()
    98     dbc.close()
    98 
    99 
    99 
   100 
   100 def set_permissions84(dbh, dc_vers, dovecot, postfix):
   101 def set_permissions84(dbh, dc_vers, dovecot, postfix):
   101     dc_rw_tbls = ('userquota_11', 'userquota')[dc_vers == 12]
   102     dc_rw_tbls = ('userquota_11', 'userquota')[dc_vers == 12]
   102     dc_ro_tbls = 'maillocation, service_set, quotalimit'
   103     dc_ro_tbls = 'mailboxformat, maillocation, service_set, quotalimit'
   103     pf_ro_tbls = 'alias, catchall, relocated, transport'
   104     pf_ro_tbls = 'alias, catchall, postfix_gid, relocated, transport'
   104     db = dict(dovecot=dovecot, postfix=postfix)
   105     db = dict(dovecot=dovecot, postfix=postfix)
   105     db['dovecot_tbls'] = {
   106     db['dovecot_tbls'] = {
   106         'domain_data': 'domaindir, gid, qid, ssid',
   107         'domain_data': 'domaindir, gid, qid, ssid',
   107         'domain_name': 'domainname, gid',
   108         'domain_name': 'domainname, gid',
   108         'mailboxformat': 'format',
       
   109         'users': 'gid, local_part, mid, passwd, qid, ssid, uid',
   109         'users': 'gid, local_part, mid, passwd, qid, ssid, uid',
   110     }
   110     }
   111     db['postfix_tbls'] = {
   111     db['postfix_tbls'] = {
   112         'domain_data': 'domaindir, gid, tid',
   112         'domain_data': 'domaindir, gid, tid',
   113         'domain_name': 'domainname, gid',
   113         'domain_name': 'domainname, gid',