def view_execution_permitted(context, request, name=''):
 reg = _get_registry(request)
 provides = ([IViewClassifier] + map_(providedBy, (request, context)))
 view = reg.adapters.lookup(provides, ISecuredView, name=name)
 if (view is None):
  view = reg.adapters.lookup(provides, IView, name=name)
  if (view is None):
   raise TypeError('No registered view satisfies the constraints. It would not make sense to claim that this view "is" or "is not" permitted.')
  return Allowed(('Allowed: view name %r in context %r (no permission defined)' % (name, context)))
 return view.__permitted__(context, request)

def view_execution_permitted ( context , request , name = '' ) : reg = _get_registry ( request ) provides = ( [ IViewClassifier ] + map_ ( providedBy , ( request , context ) ) ) view = reg . adapters . lookup ( provides , ISecuredView , name = name ) if ( view is None ) : view = reg . adapters . lookup ( provides , IView , name = name ) if ( view is None ) : raise TypeError ( 'No registered view satisfies the constraints. It would not make sense to claim that this view "is" or "is not" permitted.' ) return Allowed ( ( 'Allowed: view name %r in context %r (no permission defined)' % ( name , context ) ) ) return view . __permitted__ ( context , request )
if the view specified by context and name is protected by a :term:permission .