Mercurial > kallithea
comparison rhodecode/lib/auth.py @ 1056:520d27f40b51 beta
#113 removed anonymous access from forking, added system messages in login box.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 15 Feb 2011 23:19:01 +0100 |
parents | 8e49b6ceffe1 |
children | 716911af91e1 |
comparison
equal
deleted
inserted
replaced
1055:903aadbf9047 | 1056:520d27f40b51 |
---|---|
31 | 31 |
32 from decorator import decorator | 32 from decorator import decorator |
33 | 33 |
34 from pylons import config, session, url, request | 34 from pylons import config, session, url, request |
35 from pylons.controllers.util import abort, redirect | 35 from pylons.controllers.util import abort, redirect |
36 from pylons.i18n.translation import _ | |
36 | 37 |
37 from rhodecode.lib.exceptions import LdapPasswordError, LdapUsernameError | 38 from rhodecode.lib.exceptions import LdapPasswordError, LdapUsernameError |
38 from rhodecode.lib.utils import get_repo_slug | 39 from rhodecode.lib.utils import get_repo_slug |
39 from rhodecode.lib.auth_ldap import AuthLdap | 40 from rhodecode.lib.auth_ldap import AuthLdap |
40 | 41 |
382 p += request.environ.get('SCRIPT_NAME') | 383 p += request.environ.get('SCRIPT_NAME') |
383 | 384 |
384 p += request.environ.get('PATH_INFO') | 385 p += request.environ.get('PATH_INFO') |
385 if request.environ.get('QUERY_STRING'): | 386 if request.environ.get('QUERY_STRING'): |
386 p += '?' + request.environ.get('QUERY_STRING') | 387 p += '?' + request.environ.get('QUERY_STRING') |
388 | |
389 import rhodecode.lib.helpers as h | |
390 h.flash(_('You need to be a registered user to perform this action'), | |
391 category='warning') | |
387 return redirect(url('login_home', came_from=p)) | 392 return redirect(url('login_home', came_from=p)) |
388 else: | 393 else: |
389 return func(*fargs, **fkwargs) | 394 return func(*fargs, **fkwargs) |
390 | 395 |
391 class PermsDecorator(object): | 396 class PermsDecorator(object): |