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-67ecbb4d7f56remotes/github/custis
parent
ceb4990dec
commit
c6582d1480
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue