Project

General

Profile

Feature #1401

API: file access

Added by Bernhard Koschicek about 1 month ago. Updated 5 days ago.

Status:
Closed
Priority:
Low
Category:
API
Target version:
Start date:
2020-10-22
Estimated time:

Description

For another front end the images need to be available through the API. Since right now, images are only available to logged-in user, it created an extra path /api/display/, where the images are shown if api setting is on public.
Please share thoughts about that, I would like to add it to the new version.

A further feature would be at api settings, that admin/manager can control, if images are available if api is public.

History

#1

Updated by Alexander Watzinger about 1 month ago

  • Status changed from New to Acknowledged
  • Subject changed from API: Make linked images available to API: file access

Good question. It works with the THANADOS (Flask) frontend because there authorization uses the functionality of the backend. My thoughts:

Images are not in the web root folder, so not available by default and that won't change.

We can implement that they are accessible if the API is public, I wouldn't make an extra option because either you have access to data (including file data) or not.

I generally don't want to get into the (quite possible) mess to allow API access on a per entity level basis but with files we could restrict access to files with a specified license. Luckily license is a standard type (the root type can't be deleted or renamed) but we may add a whitelist to further define which licenses are ok for public access.

#2

Updated by Bernhard Koschicek about 1 month ago

We can implement that they are accessible if the API is public, I wouldn't make an extra option because either you have access to data (including file data) or not.

I implemented it this way. And there I have a reason to write manual text with sphinx....
#3

Updated by Bernhard Koschicek about 1 month ago

Coding complete. To do: Code commentation of api_access, sphinx documentation and nosetests

#4

Updated by Bernhard Koschicek about 1 month ago

  • Status changed from Acknowledged to Closed
#5

Updated by Alexander Watzinger 5 days ago

  • Target version changed from 5.7.0 to 5.6.0

Also available in: Atom PDF