PKÑF6restrictedarea/__init__.pyPK¯ƒ68åuk‹‹restrictedarea/__init__.pyo;ò ë8ÈEc@sdS(N((((s;build/bdist.darwin-8.0.1-x86/egg/restrictedarea/__init__.pys?sPK¯ƒ68ª¼n9 9 restrictedarea/filter.pyo;ò ;šÉEc@sjdkTdklZdklZlZdklZlZdk l Z dgZ de fd„ƒYZ dS((s*(s ListOption(sIPermissionRequestorsPermissionError(sIRequestFilters HTTPForbidden(s to_unicodesRestrictedAreaFiltercBsWtZdZdZeddddddƒZeeeƒd„Z d „Z d „Z RS( sFRequest filter allowing only privileged users to access certain pages.sRESTRICTED_AREA_ACCESSsrestrictedareaspathssdefaults/wiki/restrictedsdocsIPaths that allow only users with the `RESTRICTED_AREA_ACCESS` privileges.cCs|igSdS(N(sselfs"_RestrictedAreaFilter__action_name(sself((s9build/bdist.darwin-8.0.1-x86/egg/restrictedarea/filter.pysget_permission_actionsscCs…xz|iD]o}|itjotdƒ‚n|ii|ƒo|ii |i ƒ ot t t |i ƒƒƒ‚q q W|SdS(Ns>To use the RestrictedAreaPlugin you need at least Trac 0.10.3.(sselfspathsspathsreqspermsNones TracErrors path_infos startswithshas_permissions"_RestrictedAreaFilter__action_names HTTPForbiddens to_unicodesPermissionErrorshandler(sselfsreqshandlerspath((s9build/bdist.darwin-8.0.1-x86/egg/restrictedarea/filter.pyspre_process_requests *#cCs||fSdS(N(stemplates content_type(sselfsreqstemplates content_type((s9build/bdist.darwin-8.0.1-x86/egg/restrictedarea/filter.pyspost_process_request!s( s__name__s __module__s__doc__s"_RestrictedAreaFilter__action_names ListOptionspathss implementssIRequestFiltersIPermissionRequestorsget_permission_actionsspre_process_requestspost_process_request(((s9build/bdist.darwin-8.0.1-x86/egg/restrictedarea/filter.pysRestrictedAreaFilter s     N(s trac.cores trac.configs ListOptions trac.permsIPermissionRequestorsPermissionErrors trac.web.apisIRequestFilters HTTPForbiddenstrac.util.texts to_unicodes__all__s ComponentsRestrictedAreaFilter(s ListOptions to_unicodes__all__sIPermissionRequestorsIRequestFiltersRestrictedAreaFilters HTTPForbiddensPermissionError((s9build/bdist.darwin-8.0.1-x86/egg/restrictedarea/filter.pys?s    PK­ƒ68åuk‹‹restrictedarea/__init__.pyc;ò ë8ÈEc@sdS(N((((s;build/bdist.darwin-8.0.1-x86/egg/restrictedarea/__init__.pys?sPK®ƒ68ª¼n9 9 restrictedarea/filter.pyc;ò ;šÉEc@sjdkTdklZdklZlZdklZlZdk l Z dgZ de fd„ƒYZ dS((s*(s ListOption(sIPermissionRequestorsPermissionError(sIRequestFilters HTTPForbidden(s to_unicodesRestrictedAreaFiltercBsWtZdZdZeddddddƒZeeeƒd„Z d „Z d „Z RS( sFRequest filter allowing only privileged users to access certain pages.sRESTRICTED_AREA_ACCESSsrestrictedareaspathssdefaults/wiki/restrictedsdocsIPaths that allow only users with the `RESTRICTED_AREA_ACCESS` privileges.cCs|igSdS(N(sselfs"_RestrictedAreaFilter__action_name(sself((s9build/bdist.darwin-8.0.1-x86/egg/restrictedarea/filter.pysget_permission_actionsscCs…xz|iD]o}|itjotdƒ‚n|ii|ƒo|ii |i ƒ ot t t |i ƒƒƒ‚q q W|SdS(Ns>To use the RestrictedAreaPlugin you need at least Trac 0.10.3.(sselfspathsspathsreqspermsNones TracErrors path_infos startswithshas_permissions"_RestrictedAreaFilter__action_names HTTPForbiddens to_unicodesPermissionErrorshandler(sselfsreqshandlerspath((s9build/bdist.darwin-8.0.1-x86/egg/restrictedarea/filter.pyspre_process_requests *#cCs||fSdS(N(stemplates content_type(sselfsreqstemplates content_type((s9build/bdist.darwin-8.0.1-x86/egg/restrictedarea/filter.pyspost_process_request!s( s__name__s __module__s__doc__s"_RestrictedAreaFilter__action_names ListOptionspathss implementssIRequestFiltersIPermissionRequestorsget_permission_actionsspre_process_requestspost_process_request(((s9build/bdist.darwin-8.0.1-x86/egg/restrictedarea/filter.pysRestrictedAreaFilter s     N(s trac.cores trac.configs ListOptions trac.permsIPermissionRequestorsPermissionErrors trac.web.apisIRequestFilters HTTPForbiddenstrac.util.texts to_unicodes__all__s ComponentsRestrictedAreaFilter(s ListOptions to_unicodes__all__sIPermissionRequestorsIRequestFiltersRestrictedAreaFilters HTTPForbiddensPermissionError((s9build/bdist.darwin-8.0.1-x86/egg/restrictedarea/filter.pys?s    PKÁ"G6R¢VR‡‡restrictedarea/filter.pyfrom trac.core import * from trac.config import ListOption from trac.perm import IPermissionRequestor, PermissionError from trac.web.api import IRequestFilter, HTTPForbidden from trac.util.text import to_unicode __all__ = ['RestrictedAreaFilter'] class RestrictedAreaFilter(Component): """Request filter allowing only privileged users to access certain pages.""" __action_name = 'RESTRICTED_AREA_ACCESS' paths = ListOption('restrictedarea', 'paths', default='/wiki/restricted', doc='Paths that allow only users with the `RESTRICTED_AREA_ACCESS` privileges.') implements(IRequestFilter, IPermissionRequestor) # IPermissionRequestor methods def get_permission_actions(self): return [self.__action_name] # IRequestFilter methods def pre_process_request(self, req, handler): for path in self.paths: if req.perm is None: # at least in Trac 0.10.2 req.perm seems to be always None ... raise TracError("To use the RestrictedAreaPlugin you need at least Trac 0.10.3.") if req.path_info.startswith(path) and not req.perm.has_permission(self.__action_name): raise HTTPForbidden(to_unicode(PermissionError(self.__action_name))) return handler def post_process_request(self, req, template, content_type): return template, content_type PK±ƒ68“×2EGG-INFO/zip-safe PK¬ƒ687„‹´EGG-INFO/SOURCES.txtsetup.py TracRestrictedArea.egg-info/PKG-INFO TracRestrictedArea.egg-info/SOURCES.txt TracRestrictedArea.egg-info/dependency_links.txt TracRestrictedArea.egg-info/entry_points.txt TracRestrictedArea.egg-info/top_level.txt restrictedarea/__init__.py restrictedarea/filter.py PK¬ƒ68ÄØò>>EGG-INFO/entry_points.txt[trac.plugins] restrictedarea.filter = restrictedarea.filter PK¬ƒ68“×2EGG-INFO/dependency_links.txt PK«ƒ68Jð"ƒ‘‘EGG-INFO/PKG-INFOMetadata-Version: 1.0 Name: TracRestrictedArea Version: 1.0.0 Summary: Allows the setup of restricted areas with access only for privileged users. Home-page: http://trac-hacks.org/wiki/RestrictedAreaPlugin Author: Christian Spurk, DFKI Author-email: Christian.Spurk@dfki.de License: BSD Description: UNKNOWN Keywords: trac plugin restricted area access Platform: UNKNOWN Classifier: Framework :: Trac PK«ƒ68 gíjEGG-INFO/top_level.txtrestrictedarea PKÑF6¤restrictedarea/__init__.pyPK¯ƒ68åuk‹‹¤8restrictedarea/__init__.pyoPK¯ƒ68ª¼n9 9 ¤ürestrictedarea/filter.pyoPK­ƒ68åuk‹‹¤l restrictedarea/__init__.pycPK®ƒ68ª¼n9 9 ¤0 restrictedarea/filter.pycPKÁ"G6R¢VR‡‡¤ restrictedarea/filter.pyPK±ƒ68“×2¤]EGG-INFO/zip-safePK¬ƒ687„‹´¤EGG-INFO/SOURCES.txtPK¬ƒ68ÄØò>>¤ÑEGG-INFO/entry_points.txtPK¬ƒ68“×2¤FEGG-INFO/dependency_links.txtPK«ƒ68Jð"ƒ‘‘¤‚EGG-INFO/PKG-INFOPK«ƒ68 gíj¤B EGG-INFO/top_level.txtPK D…