--- a/__pkginfo__.py Wed Oct 21 11:34:11 2009 +0200
+++ b/__pkginfo__.py Wed Oct 21 13:52:16 2009 +0200
@@ -7,7 +7,7 @@
distname = "cubicweb"
modname = "cubicweb"
-numversion = (3, 5, 4)
+numversion = (3, 5, 5)
version = '.'.join(str(num) for num in numversion)
license = 'LGPL v2'
--- a/debian/changelog Wed Oct 21 11:34:11 2009 +0200
+++ b/debian/changelog Wed Oct 21 13:52:16 2009 +0200
@@ -1,3 +1,9 @@
+cubicweb (3.5.5-1) unstable; urgency=low
+
+ * new upstream release
+
+ -- Sylvain Thénault <sylvain.thenault@logilab.fr> Wed, 21 Oct 2009 10:38:55 +0200
+
cubicweb (3.5.4-1) unstable; urgency=low
* new upstream release
--- a/debian/control Wed Oct 21 11:34:11 2009 +0200
+++ b/debian/control Wed Oct 21 13:52:16 2009 +0200
@@ -76,7 +76,7 @@
Package: cubicweb-common
Architecture: all
XB-Python-Version: ${python:Versions}
-Depends: ${python:Depends}, graphviz, gettext, python-logilab-mtconverter (>= 0.6.0), python-logilab-common (>= 0.44.0), python-yams (>= 0.24.0), python-rql (>= 0.22.3), python-lxml
+Depends: ${python:Depends}, graphviz, gettext, python-logilab-mtconverter (>= 0.6.0), python-logilab-common (>= 0.44.0), python-yams (>= 0.25.0), python-rql (>= 0.22.3), python-lxml
Recommends: python-simpletal (>= 4.0)
Conflicts: cubicweb-core
Replaces: cubicweb-core
--- a/schemaviewer.py Wed Oct 21 11:34:11 2009 +0200
+++ b/schemaviewer.py Wed Oct 21 13:52:16 2009 +0200
@@ -31,9 +31,11 @@
data = [self.req._('access type'), self.req._('groups')]
for access_type in access_types:
data.append(self.req._(access_type))
- acls = [self.req._(group) for group in schema.get_groups(access_type)]
- acls += (rqlexp.expression for rqlexp in schema.get_rqlexprs(access_type))
- data.append(', '.join(acls))
+ acls = [Link(self.req.build_url('cwgroup/%s' % group), self.req._(group))
+ for group in schema.get_groups(access_type)]
+ acls += (Text(rqlexp.expression) for rqlexp in schema.get_rqlexprs(access_type))
+ acls = [n for _n in acls for n in (_n, Text(', '))][:-1]
+ data.append(Span(children=acls))
return Section(children=(Table(cols=2, cheaders=1, rheaders=1, children=data),),
klass='acl')
@@ -107,7 +109,7 @@
layout.append(Link(etype,' ' , id=etype)) # anchor
title = Link(self.eschema_link_url(eschema), etype)
boxchild = [Section(children=(title, ' (%s)'% eschema.display_name(self.req)), klass='title')]
- table = Table(cols=4, rheaders=1,
+ table = Table(cols=4, rheaders=1, klass='listing',
children=self._entity_attributes_data(eschema))
boxchild.append(Section(children=(table,), klass='body'))
data = []
@@ -158,18 +160,21 @@
def visit_relationschema(self, rschema, title=True):
"""get a layout for a relation schema"""
_ = self.req._
- title = Link(self.rschema_link_url(rschema), rschema.type)
- stereotypes = []
- if rschema.meta:
- stereotypes.append('meta')
- if rschema.symetric:
- stereotypes.append('symetric')
- if rschema.inlined:
- stereotypes.append('inlined')
- title = Section(children=(title, ' (%s)'%rschema.display_name(self.req)), klass='title')
- if stereotypes:
- title.append(self.stereotype(','.join(stereotypes)))
- layout = Section(children=(title,), klass='schema')
+ if title:
+ title = Link(self.rschema_link_url(rschema), rschema.type)
+ stereotypes = []
+ if rschema.meta:
+ stereotypes.append('meta')
+ if rschema.symetric:
+ stereotypes.append('symetric')
+ if rschema.inlined:
+ stereotypes.append('inlined')
+ title = Section(children=(title, ' (%s)'%rschema.display_name(self.req)), klass='title')
+ if stereotypes:
+ title.append(self.stereotype(','.join(stereotypes)))
+ layout = Section(children=(title,), klass='schema')
+ else:
+ layout = Section(klass='schema')
data = [_('from'), _('to')]
schema = rschema.schema
rschema_objects = rschema.objects()
@@ -202,7 +207,7 @@
else:
val = str(val)
data.append(Text(val))
- table = Table(cols=cols, rheaders=1, children=data)
+ table = Table(cols=cols, rheaders=1, children=data, klass='listing')
layout.append(Section(children=(table,), klass='relationDefinition'))
if not self.req.cnx.anonymous_connection:
layout.append(self.format_acls(rschema, ('read', 'add', 'delete')))
--- a/test/unittest_entity.py Wed Oct 21 11:34:11 2009 +0200
+++ b/test/unittest_entity.py Wed Oct 21 13:52:16 2009 +0200
@@ -203,7 +203,7 @@
'X modification_date AA')
self.assertEquals(tag.related_rql('tags', 'subject', ('Personne',)),
'Any X,AA,AB ORDERBY AA ASC '
- 'WHERE E eid %(x)s, E tags XE is IN (Personne), X nom AA, '
+ 'WHERE E eid %(x)s, E tags X, E is IN (Personne), X nom AA, '
'X modification_date AB')
def test_unrelated_rql_security_1(self):
--- a/web/views/schema.py Wed Oct 21 11:34:11 2009 +0200
+++ b/web/views/schema.py Wed Oct 21 13:52:16 2009 +0200
@@ -18,7 +18,7 @@
from cubicweb.schemaviewer import SchemaViewer
from cubicweb.view import EntityView, StartupView
from cubicweb.common import tags, uilib
-from cubicweb.web import action, facet
+from cubicweb.web import action, facet, uicfg
from cubicweb.web.views import TmpFileViewMixin
from cubicweb.web.views import primary, baseviews, tabs, management
@@ -36,6 +36,11 @@
return SKIP_TYPES
return ALWAYS_SKIP_TYPES
+_pvs = uicfg.primaryview_section
+for _action in ('read', 'add', 'update', 'delete'):
+ _pvs.tag_subject_of(('*', '%s_permission' % _action, '*'), 'hidden')
+ _pvs.tag_object_of(('*', '%s_permission' % _action, '*'), 'hidden')
+
# global schema view ###########################################################
class SchemaView(tabs.TabsMixin, StartupView):
@@ -279,6 +284,7 @@
def cell_call(self, row, col):
entity = self.rset.get_entity(row, col)
+ _ = self.req._
self.w(u'<h2>%s</h2>' % _('Add permissions'))
rset = self.req.execute('Any P WHERE X add_permission P, '
'X eid %(x)s',
@@ -334,7 +340,7 @@
super(CWRTypeSchemaView, self).render_entity_attributes(entity)
rschema = self.vreg.schema.rschema(entity.name)
viewer = SchemaViewer(self.req)
- layout = viewer.visit_relationschema(rschema)
+ layout = viewer.visit_relationschema(rschema, title=False)
self.w(uilib.ureport_as_html(layout))
if not rschema.final:
msg = self.req._('graphical schema for %s') % entity.name