im_rest_error -format $org_format -http_status 500 -message "Invalid DynField configuration: Object type '$rest_otype' doesn't have a table_name specified in table acs_object_types."
return [im_rest_error -format $org_format -http_status 500 -message "Invalid DynField configuration: Object type '$rest_otype' doesn't have a table_name specified in table acs_object_types."]
}
# Deal with ugly situation that usre_id is defined multiple times for object_type=user
if {"users" == $table_name}{ set id_column "person_id"}
set write_p [im_object_permission -object_id $rest_otype_id -user_id $rest_user_id -privilege "write"]
if {!$write_p}{
set msg "im_rest_post_object: User #$rest_user_id has no 'write' permission in general on object type '$rest_otype' - please check your REST permissions"
im_rest_error -format $format -http_status 403 -message "User #$rest_user_id has no 'admin' permission to perform DELETE on object #$rest_oid"
return
return [im_rest_error -format $format -http_status 403 -message "User #$rest_user_id has no 'admin' permission to perform DELETE on object #$rest_oid"]
im_rest_error -format $format -http_status 404 -message "DELETE for object #$rest_oid of type \"$rest_otype\" created errors: $destroyed_err_msg"
return
return [im_rest_error -format $format -http_status 404 -message "DELETE for object #$rest_oid of type \"$rest_otype\" created errors: $destroyed_err_msg"]
}
# The delete was successful - return a suitable message.