@functools.wraps(func)
def wrapper_has_perm(*args, **kwargs):
    if (not arg_name):
        return
    resource = (request.view_args.get(arg_name) or request.values.get(arg_name))
    if ((callback is not None) and resource):
        resource = callback(resource)
    if (current_app.config.get('USE_ACL') and resource):
        validate_permission(resource, resource_type, perm)
    return func(*args, **kwargs)
@functools.wraps(func)
def wrapper_has_perm(*args, **kwargs):
    if (not arg_name):
        return
    resource = (request.view_args.get(arg_name) or request.values.get(arg_name))
    if ((callback is not None) and resource):
        resource = callback(resource)
    if (current_app.config.get('USE_ACL') and resource):
        validate_permission(resource, resource_type, perm)
    return func(*args, **kwargs)