"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/vcauth/forbidden/__init__.py" between
viewvc-1.1.28.tar.gz and viewvc-1.2.1.tar.gz

About: ViewVC is a browser interface for CVS and Subversion version control repositories.

__init__.py  (viewvc-1.1.28):__init__.py  (viewvc-1.2.1)
skipping to change at line 15 skipping to change at line 15
# By using this file, you agree to the terms and conditions set forth in # By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC # the LICENSE.html file which can be found at the top level of the ViewVC
# distribution or at http://viewvc.org/license-1.html. # distribution or at http://viewvc.org/license-1.html.
# #
# For more information, visit http://viewvc.org/ # For more information, visit http://viewvc.org/
# #
# ----------------------------------------------------------------------- # -----------------------------------------------------------------------
import vcauth import vcauth
import vclib import vclib
import fnmatch import fnmatch
import string
class ViewVCAuthorizer(vcauth.GenericViewVCAuthorizer): class ViewVCAuthorizer(vcauth.GenericViewVCAuthorizer):
"""A simple top-level module authorizer.""" """A simple top-level module authorizer."""
def __init__(self, root_lookup_func, username, params={}): def __init__(self, root_lookup_func, username, params={}):
forbidden = params.get('forbidden', '') forbidden = params.get('forbidden', '')
self.forbidden = map(string.strip, self.forbidden = map(lambda x: x.strip(),
filter(None, string.split(forbidden, ','))) filter(None, forbidden.split(',')))
def check_root_access(self, rootname): def check_root_access(self, rootname):
return 1 return 1
def check_universal_access(self, rootname): def check_universal_access(self, rootname):
# If there aren't any forbidden paths, we can grant universal read # If there aren't any forbidden paths, we can grant universal read
# access. Otherwise, we make no claim. # access. Otherwise, we make no claim.
if not self.forbidden: if not self.forbidden:
return 1 return 1
return None return None
 End of changes. 2 change blocks. 
3 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)