comparison src/server/constants.py @ 922:16d1084d1371

server (pages): added "None" access (page is not rendered at all) and some HTTP code constants + helper methods to get session data
author Goffi <goffi@goffi.org>
date Mon, 03 Apr 2017 01:00:26 +0200
parents 86563d6c83b0
children 8a393ae90f8c
comparison
equal deleted inserted replaced
921:cf527974a0fa 922:16d1084d1371
50 STATIC_RSM_MAX_DEFAULT = 10 50 STATIC_RSM_MAX_DEFAULT = 10
51 STATIC_RSM_MAX_COMMENTS_DEFAULT = 10 51 STATIC_RSM_MAX_COMMENTS_DEFAULT = 10
52 52
53 ## Libervia pages ## 53 ## Libervia pages ##
54 PAGES_META_FILE = u"page_meta.py" 54 PAGES_META_FILE = u"page_meta.py"
55 PAGES_ACCESS_NONE = u"none" # no access to this page (using its path will return a 404 error)
55 PAGES_ACCESS_PUBLIC = u"public" 56 PAGES_ACCESS_PUBLIC = u"public"
56 PAGES_ACCESS_PROFILE = u"profile" # a session with an existing profile must be started 57 PAGES_ACCESS_PROFILE = u"profile" # a session with an existing profile must be started
57 PAGES_ACCESS_ADMIN = u"admin" # only profiles set in admins_list can access the page 58 PAGES_ACCESS_ADMIN = u"admin" # only profiles set in admins_list can access the page
58 PAGES_ACCESS_ALL = (PAGES_ACCESS_PUBLIC, PAGES_ACCESS_PROFILE, PAGES_ACCESS_ADMIN) 59 PAGES_ACCESS_ALL = (PAGES_ACCESS_NONE, PAGES_ACCESS_PUBLIC, PAGES_ACCESS_PROFILE, PAGES_ACCESS_ADMIN)
60
61 ## HTTP codes ##
62 HTTP_BAD_REQUEST = 400
63 HTTP_UNAUTHORIZED = 401
64 HTTP_NOT_FOUND = 404