test/data_schemareader/schema.py
author Julien Cristau <julien.cristau@logilab.fr>
Tue, 06 May 2014 10:28:23 +0200
changeset 10455 ad0615d4500d
parent 8167 41ec579e27c4
child 10907 9ae707db5265
permissions -rw-r--r--
[server/test] Add a test for db-statement-timeout option Sadly I don't think there's a way to test that functionality without adding sleeps which make the test suite longer :/ Related to #2547026

from cubicweb.schemas.base import in_group, CWSourceSchemaConfig
# copy __permissions__ to avoid modifying a shared dictionary
in_group.__permissions__ = in_group.__permissions__.copy()
in_group.__permissions__['read'] = ('managers',)

cw_for_source = CWSourceSchemaConfig.get_relation('cw_for_source')
cw_for_source.__permissions__ = {'read': ('managers', 'users'),
                                 'add': ('managers',),
                                 'delete': ('managers',)}