equal
deleted
inserted
replaced
29 from six import PY2, text_type, string_types, add_metaclass |
29 from six import PY2, text_type, string_types, add_metaclass |
30 from six.moves import range |
30 from six.moves import range |
31 |
31 |
32 from logilab.common.decorators import cached, clear_cache, monkeypatch, cachedproperty |
32 from logilab.common.decorators import cached, clear_cache, monkeypatch, cachedproperty |
33 from logilab.common.logging_ext import set_log_methods |
33 from logilab.common.logging_ext import set_log_methods |
34 from logilab.common.deprecation import deprecated |
|
35 from logilab.common.textutils import splitstrip |
34 from logilab.common.textutils import splitstrip |
36 from logilab.common.graph import get_cycles |
35 from logilab.common.graph import get_cycles |
37 |
36 |
38 import yams |
37 import yams |
39 from yams import BadSchemaDefinition, buildobjs as ybo |
38 from yams import BadSchemaDefinition, buildobjs as ybo |
991 for rdef in self.rdefs.values(): |
990 for rdef in self.rdefs.values(): |
992 if not rdef.has_perm(_cw, action, **kwargs): |
991 if not rdef.has_perm(_cw, action, **kwargs): |
993 return False |
992 return False |
994 return True |
993 return True |
995 |
994 |
996 @deprecated('use .rdef(subjtype, objtype).role_cardinality(role)') |
|
997 def cardinality(self, subjtype, objtype, target): |
|
998 return self.rdef(subjtype, objtype).role_cardinality(target) |
|
999 |
|
1000 |
995 |
1001 class CubicWebSchema(Schema): |
996 class CubicWebSchema(Schema): |
1002 """set of entities and relations schema defining the possible data sets |
997 """set of entities and relations schema defining the possible data sets |
1003 used in an application |
998 used in an application |
1004 |
999 |