Fix library permissions API controller.