o 3Ûøaã@s(Gdd„dƒZGdd„dƒZdd„ZdS)c@s4eZdZdd„Zdd„Zdd„Zdd„Zd d „Zd S) ÚPermLookupDictcCs|||_|_dS©N)ÚuserÚ app_label)Úselfrr©rúH/usr/lib/python3/dist-packages/django/contrib/auth/context_processors.pyÚ__init__szPermLookupDict.__init__cCst|j ¡ƒSr)ÚstrrÚget_all_permissions©rrrrÚ__repr__ ózPermLookupDict.__repr__cCs|j d|j|f¡S)Nz%s.%s)rÚhas_permr)rÚ perm_namerrrÚ __getitem__ szPermLookupDict.__getitem__cCótdƒ‚)NzPermLookupDict is not iterable.©Ú TypeErrorr rrrÚ__iter__szPermLookupDict.__iter__cCs|j |j¡Sr)rÚhas_module_permsrr rrrÚ__bool__r zPermLookupDict.__bool__N)Ú__name__Ú __module__Ú __qualname__rr rrrrrrrrs  rc@s,eZdZdd„Zdd„Zdd„Zdd„Zd S) Ú PermWrappercCs ||_dSr)r)rrrrrrs zPermWrapper.__init__cCs t|j|ƒSr)rr)rrrrrrs zPermWrapper.__getitem__cCr)NzPermWrapper is not iterable.rr rrrrszPermWrapper.__iter__cCs0d|vr t||ƒS| dd¡\}}|||S)zE Lookup by "someapp" or "someapp.someperm" in perms. Ú.é)ÚboolÚsplit)rrrrrrÚ __contains__#s  zPermWrapper.__contains__N)rrrrrrrrrrrrs  rcCs2t|dƒr |j}n ddlm}|ƒ}|t|ƒdœS)zÇ Return context variables required by apps that use Django's authentication system. If there is no 'user' attribute in the request, use AnonymousUser (from django.contrib.auth). ré)Ú AnonymousUser)rÚperms)ÚhasattrrÚdjango.contrib.auth.modelsr!r)Úrequestrr!rrrÚauth.s  þr&N)rrr&rrrrÚs