entities/schemaobjs.py
branchstable
changeset 7782 40a49f4350a5
parent 7780 a1d5365fefc1
child 7797 a71618a75b53
--- a/entities/schemaobjs.py	Tue Sep 13 14:54:00 2011 +0200
+++ b/entities/schemaobjs.py	Tue Sep 13 15:40:06 2011 +0200
@@ -176,3 +176,13 @@
 
     def check_expression(self, *args, **kwargs):
         return self._rqlexpr().check(*args, **kwargs)
+
+
+class CWPermission(AnyEntity):
+    __regid__ = 'CWPermission'
+    fetch_attrs, fetch_order = fetch_config(['name', 'label'])
+
+    def dc_title(self):
+        if self.label:
+            return '%s (%s)' % (self._cw._(self.name), self.label)
+        return self._cw._(self.name)