web/webconfig.py
changeset 5473 ee87c5352e63
parent 5467 57372dbfd114
parent 5456 d040889fac4e
child 5489 50e2d8e10638
equal deleted inserted replaced
5471:b7bf1c6751fd 5473:ee87c5352e63
    96           }),
    96           }),
    97         ('query-log-file',
    97         ('query-log-file',
    98          {'type' : 'string',
    98          {'type' : 'string',
    99           'default': None,
    99           'default': None,
   100           'help': 'web instance query log file',
   100           'help': 'web instance query log file',
   101           'group': 'main', 'level': 2,
   101           'group': 'main', 'level': 3,
   102           }),
   102           }),
   103         # web configuration
   103         # web configuration
   104         ('https-url',
   104         ('https-url',
   105          {'type' : 'string',
   105          {'type' : 'string',
   106           'default': None,
   106           'default': None,
   110           'https site. IMPORTANTE NOTE: to do this work, you should have your '\
   110           'https site. IMPORTANTE NOTE: to do this work, you should have your '\
   111           'apache redirection include "https" as base url path so cubicweb can '\
   111           'apache redirection include "https" as base url path so cubicweb can '\
   112           'differentiate between http vs https access. For instance: \n'\
   112           'differentiate between http vs https access. For instance: \n'\
   113           'RewriteRule ^/demo/(.*) http://127.0.0.1:8080/https/$1 [L,P]\n'\
   113           'RewriteRule ^/demo/(.*) http://127.0.0.1:8080/https/$1 [L,P]\n'\
   114           'where the cubicweb web server is listening on port 8080.',
   114           'where the cubicweb web server is listening on port 8080.',
   115           'group': 'main', 'level': 2,
   115           'group': 'main', 'level': 3,
   116           }),
   116           }),
   117         ('auth-mode',
   117         ('auth-mode',
   118          {'type' : 'choice',
   118          {'type' : 'choice',
   119           'choices' : ('cookie', 'http'),
   119           'choices' : ('cookie', 'http'),
   120           'default': 'cookie',
   120           'default': 'cookie',
   121           'help': 'authentication mode (cookie / http)',
   121           'help': 'authentication mode (cookie / http)',
   122           'group': 'web', 'level': 1,
   122           'group': 'web', 'level': 3,
   123           }),
   123           }),
   124         ('realm',
   124         ('realm',
   125          {'type' : 'string',
   125          {'type' : 'string',
   126           'default': 'cubicweb',
   126           'default': 'cubicweb',
   127           'help': 'realm to use on HTTP authentication mode',
   127           'help': 'realm to use on HTTP authentication mode',
   128           'group': 'web', 'level': 2,
   128           'group': 'web', 'level': 3,
   129           }),
   129           }),
   130         ('http-session-time',
   130         ('http-session-time',
   131          {'type' : 'time',
   131          {'type' : 'time',
   132           'default': 0,
   132           'default': 0,
   133           'help': "duration of the cookie used to store session identifier. "
   133           'help': "duration of the cookie used to store session identifier. "
   142           'will be closed, to limit memory consumption (avoid sessions that '
   142           'will be closed, to limit memory consumption (avoid sessions that '
   143           'never expire and cause memory leak when http-session-time is 0). '
   143           'never expire and cause memory leak when http-session-time is 0). '
   144           'So even if http-session-time is 0 and the user don\'t close his '
   144           'So even if http-session-time is 0 and the user don\'t close his '
   145           'browser, he will have to reauthenticate after this time of '
   145           'browser, he will have to reauthenticate after this time of '
   146           'inactivity. Default to 24h.',
   146           'inactivity. Default to 24h.',
   147           'group': 'web', 'level': 2,
   147           'group': 'web', 'level': 3,
   148           }),
   148           }),
   149         ('cleanup-anonymous-session-time',
   149         ('cleanup-anonymous-session-time',
   150          {'type' : 'time',
   150          {'type' : 'time',
   151           'default': '5min',
   151           'default': '5min',
   152           'help': 'Same as cleanup-session-time but specific to anonymous '
   152           'help': 'Same as cleanup-session-time but specific to anonymous '
   153           'sessions. You can have a much smaller timeout here since it will be '
   153           'sessions. You can have a much smaller timeout here since it will be '
   154           'transparent to the user. Default to 5min.',
   154           'transparent to the user. Default to 5min.',
   155           'group': 'web', 'level': 2,
   155           'group': 'web', 'level': 3,
   156           }),
   156           }),
   157         ('force-html-content-type',
   157         ('force-html-content-type',
   158          {'type' : 'yn',
   158          {'type' : 'yn',
   159           'default': False,
   159           'default': False,
   160           'help': 'force text/html content type for your html pages instead of cubicweb user-agent based'\
   160           'help': 'force text/html content type for your html pages instead of cubicweb user-agent based'\
   161           'deduction of an appropriate content type',
   161           'deduction of an appropriate content type',
   162           'group': 'web', 'level': 2,
   162           'group': 'web', 'level': 3,
   163           }),
   163           }),
   164         ('embed-allowed',
   164         ('embed-allowed',
   165          {'type' : 'regexp',
   165          {'type' : 'regexp',
   166           'default': None,
   166           'default': None,
   167           'help': 'regular expression matching URLs that may be embeded. \
   167           'help': 'regular expression matching URLs that may be embeded. \
   168 leave it blank if you don\'t want the embedding feature, or set it to ".*" \
   168 leave it blank if you don\'t want the embedding feature, or set it to ".*" \
   169 if you want to allow everything',
   169 if you want to allow everything',
   170           'group': 'web', 'level': 1,
   170           'group': 'web', 'level': 3,
   171           }),
   171           }),
   172         ('submit-mail',
   172         ('submit-mail',
   173          {'type' : 'string',
   173          {'type' : 'string',
   174           'default': None,
   174           'default': None,
   175           'help': ('Mail used as recipient to report bug in this instance, '
   175           'help': ('Mail used as recipient to report bug in this instance, '
   195         ('captcha-font-file',
   195         ('captcha-font-file',
   196          {'type' : 'string',
   196          {'type' : 'string',
   197           'default': join(CubicWebConfiguration.shared_dir(), 'data', 'porkys.ttf'),
   197           'default': join(CubicWebConfiguration.shared_dir(), 'data', 'porkys.ttf'),
   198           'help': 'True type font to use for captcha image generation (you \
   198           'help': 'True type font to use for captcha image generation (you \
   199 must have the python imaging library installed to use captcha)',
   199 must have the python imaging library installed to use captcha)',
   200           'group': 'web', 'level': 2,
   200           'group': 'web', 'level': 3,
   201           }),
   201           }),
   202         ('captcha-font-size',
   202         ('captcha-font-size',
   203          {'type' : 'int',
   203          {'type' : 'int',
   204           'default': 25,
   204           'default': 25,
   205           'help': 'Font size to use for captcha image generation (you must \
   205           'help': 'Font size to use for captcha image generation (you must \
   206 have the python imaging library installed to use captcha)',
   206 have the python imaging library installed to use captcha)',
   207           'group': 'web', 'level': 2,
   207           'group': 'web', 'level': 3,
   208           }),
   208           }),
   209 
   209 
   210         ))
   210         ))
   211 
   211 
   212     def fckeditor_installed(self):
   212     def fckeditor_installed(self):