# HG changeset patch # User Christophe de Vienne # Date 1409935713 -7200 # Node ID fa614537e5eee6f4bff4cb804160056229cb2d9e # Parent ffe4040cf4a242ad0667ba0719c922a6c618878c Add a CWSession entity. It is a subset of the CWSession that will be added to cubicweb in a future version. Closes #4317363 diff -r ffe4040cf4a2 -r fa614537e5ee migration/postcreate.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/migration/postcreate.py Fri Sep 05 18:48:33 2014 +0200 @@ -0,0 +1,2 @@ +# Check the CW versions and add the entity only if needed ? +add_entity_type('CWSession') diff -r ffe4040cf4a2 -r fa614537e5ee schema.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema.py Fri Sep 05 18:48:33 2014 +0200 @@ -0,0 +1,26 @@ +# pylint: disable-msg=E0611,F0401 +from yams.buildobjs import EntityType, Bytes + + +class CWSession(EntityType): + """ + Persistent session support + + Used by pyramid_cubiweb to store the session datas. + + It is a partial copy of the yet-to-integrate patch of cubicweb that + provides cubicweb sessions persistency. + + While the same structure will be used by pyramid_cubicweb persistent + sessions and Cubicweb persistent sessions, the two concepts are slightly + different and will NOT co-exist in a single application. + """ + + __permissions__ = { + 'read': (), + 'add': (), + 'update': (), + 'delete': () + } + + cwsessiondata = Bytes() diff -r ffe4040cf4a2 -r fa614537e5ee site_cubicweb.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/site_cubicweb.py Fri Sep 05 18:48:33 2014 +0200 @@ -0,0 +1,3 @@ +import cubicweb.schema + +cubicweb.schema.INTERNAL_TYPES.add('CWSession')