Show More
@@ -10,10 +10,6 b' hgext.highlight=' | |||||
10 | push_ssl = false |
|
10 | push_ssl = false | |
11 | allow_archive = gz zip bz2 |
|
11 | allow_archive = gz zip bz2 | |
12 | allow_push = * |
|
12 | allow_push = * | |
13 | templates=/home/marcink/python_workspace/hg_app/pylons_app/templates/ |
|
|||
14 | style = monoblue_custom |
|
|||
15 | pygments_style = trac |
|
|||
16 | staticurl = /hg_static/ |
|
|||
17 | baseurl = / |
|
13 | baseurl = / | |
18 |
|
14 | |||
19 | [paths] |
|
15 | [paths] |
@@ -83,11 +83,11 b' class LoginRequired(object):' | |||||
83 | pass |
|
83 | pass | |
84 |
|
84 | |||
85 | def __call__(self, func): |
|
85 | def __call__(self, func): | |
86 | log.info('Checking login required') |
|
86 | user = session.get('hg_app_user', AuthUser()) | |
|
87 | log.info('Checking login required for %s', user.username) | |||
87 |
|
88 | |||
88 | @wraps(func) |
|
89 | @wraps(func) | |
89 | def _wrapper(*fargs, **fkwargs): |
|
90 | def _wrapper(*fargs, **fkwargs): | |
90 | user = session.get('hg_app_user', AuthUser()) |
|
|||
91 | if user.is_authenticated: |
|
91 | if user.is_authenticated: | |
92 | log.info('user %s is authenticated', user.username) |
|
92 | log.info('user %s is authenticated', user.username) | |
93 | func(*fargs) |
|
93 | func(*fargs) |
@@ -65,6 +65,7 b' class SimpleHg(object):' | |||||
65 | """we know that some change was made to repositories and we should |
|
65 | """we know that some change was made to repositories and we should | |
66 | invalidate the cache to see the changes right away""" |
|
66 | invalidate the cache to see the changes right away""" | |
67 | invalidate_cache('full_changelog', repo_name) |
|
67 | invalidate_cache('full_changelog', repo_name) | |
|
68 | invalidate_cache('cached_repo_list') | |||
68 | return app(environ, start_response) |
|
69 | return app(environ, start_response) | |
69 |
|
70 | |||
70 | def _make_app(self): |
|
71 | def _make_app(self): |
@@ -91,10 +91,12 b" def make_ui(path='hgwebdir.config', chec" | |||||
91 | return baseui |
|
91 | return baseui | |
92 |
|
92 | |||
93 | def invalidate_cache(name, *args): |
|
93 | def invalidate_cache(name, *args): | |
|
94 | """Invalidates given name cache""" | |||
|
95 | ||||
94 | from beaker.cache import region_invalidate |
|
96 | from beaker.cache import region_invalidate | |
95 | log.info('INVALIDATING CACHE FOR %s', name) |
|
97 | log.info('INVALIDATING CACHE FOR %s', name) | |
96 |
|
98 | |||
97 |
"""propage |
|
99 | """propagate our arguments to make sure invalidation works. First | |
98 | argument has to be the name of cached func name give to cache decorator |
|
100 | argument has to be the name of cached func name give to cache decorator | |
99 | without that the invalidation would not work""" |
|
101 | without that the invalidation would not work""" | |
100 | tmp = [name] |
|
102 | tmp = [name] |
General Comments 0
You need to be logged in to leave comments.
Login now