def require_global_staff(func):
 @wraps(func)
 def wrapped(request, *args, **kwargs):
  if GlobalStaff().has_user(request.user):
   return func(request, *args, **kwargs)
  else:
   return HttpResponseForbidden(u'Must be {platform_name} staff to perform this action.'.format(platform_name=settings.PLATFORM_NAME))
 return login_required(wrapped)

def require_global_staff ( func ) : @ wraps ( func ) def wrapped ( request , * args , ** kwargs ) : if GlobalStaff ( ) . has_user ( request . user ) : return func ( request , * args , ** kwargs ) else : return HttpResponseForbidden ( u'Must be {platform_name} staff to perform this action.' . format ( platform_name = settings . PLATFORM_NAME ) ) return login_required ( wrapped )
view decorator that requires that the user have global staff permissions .