def require_certificate_permission(func):
 @wraps(func)
 def inner(request, *args, **kwargs):
  if has_access(request.user, 'certificates', 'global'):
   return func(request, *args, **kwargs)
  else:
   return HttpResponseForbidden()
 return inner

def require_certificate_permission ( func ) : @ wraps ( func ) def inner ( request , * args , ** kwargs ) : if has_access ( request . user , 'certificates' , 'global' ) : return func ( request , * args , ** kwargs ) else : return HttpResponseForbidden ( ) return inner
view decorator that requires permission to view and regenerate certificates .