author | Christophe de Vienne <christophe@unlish.com> |
Fri, 05 Sep 2014 18:48:33 +0200 | |
changeset 11634 | fa614537e5ee |
permissions | -rw-r--r-- |
11634
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
1 |
# pylint: disable-msg=E0611,F0401 |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
2 |
from yams.buildobjs import EntityType, Bytes |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
3 |
|
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
4 |
|
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
5 |
class CWSession(EntityType): |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
6 |
""" |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
7 |
Persistent session support |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
8 |
|
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
9 |
Used by pyramid_cubiweb to store the session datas. |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
10 |
|
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
11 |
It is a partial copy of the yet-to-integrate patch of cubicweb that |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
12 |
provides cubicweb sessions persistency. |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
13 |
|
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
14 |
While the same structure will be used by pyramid_cubicweb persistent |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
15 |
sessions and Cubicweb persistent sessions, the two concepts are slightly |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
16 |
different and will NOT co-exist in a single application. |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
17 |
""" |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
18 |
|
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
19 |
__permissions__ = { |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
20 |
'read': (), |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
21 |
'add': (), |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
22 |
'update': (), |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
23 |
'delete': () |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
24 |
} |
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
25 |
|
fa614537e5ee
Add a CWSession entity.
Christophe de Vienne <christophe@unlish.com>
parents:
diff
changeset
|
26 |
cwsessiondata = Bytes() |