Bug 79260 - Fix cvsntacl auth for Python 2.6

git-svn-id: svn://svn.office.custis.ru/3rdparty/viewvc.org/trunk@1265 6955db30-a419-402b-8a0d-67ecbb4d7f56
remotes/github/custis
vfilippov 2011-04-25 11:26:05 +00:00 committed by Vitaliy Filippov
parent ceb4990dec
commit c6582d1480
2 changed files with 5 additions and 7 deletions

View File

@ -13,10 +13,11 @@
import vcauth
import vclib
import string
import debug
class ViewVCAuthorizer(vcauth.GenericViewVCAuthorizer):
"""A 'union' authorizer: it makes possible to use one authorizer for
one root and other authorizer for other roots."""
"""A 'union' authorizer: it makes possible to use different authorizers
for different roots."""
def __init__(self, username, params={}):
self.username = username
@ -45,10 +46,7 @@ class ViewVCAuthorizer(vcauth.GenericViewVCAuthorizer):
fp, path, desc = imp.find_module(aname, vcauth.__path__)
my_auth = imp.load_module('viewvc', fp, path, desc)
except ImportError:
raise debug.ViewVCException(
'Invalid authorizer (%s) specified for root "%s"' \
% (self.cfg.options.authorizer, rootname),
'500 Internal Server Error')
raise
finally:
if fp:
fp.close()

View File

@ -413,7 +413,7 @@ def check_root_access(repos):
if not auth:
return 1
return auth.check_root_access(repos.rootname())
def check_path_access(repos, path_parts, pathtype=None, rev=None):
"""Return 1 iff the associated username is permitted to read
revision REV of the path PATH_PARTS (of type PATHTYPE) in repository