def authorize_quota_class_context(context, class_name):
    'Ensures a request has permission to access the given quota class.'
    if is_user_context(context):
        if (not context.quota_class):
            raise exception.Forbidden()
        elif (context.quota_class != class_name):
            raise exception.Forbidden()
Ensures a request has permission to access the given quota class.
def authorize_quota_class_context(context, class_name):
    
    if is_user_context(context):
        if (not context.quota_class):
            raise exception.Forbidden()
        elif (context.quota_class != class_name):
            raise exception.Forbidden()