mirror of
https://github.com/enpaul/kodak.git
synced 2024-11-14 10:36:55 +00:00
Fix source resource always working even when expose_source is false
This commit is contained in:
parent
7fff10f78c
commit
fe0811d525
@ -16,6 +16,9 @@ class Image(KodakResource):
|
||||
@authenticated
|
||||
def get(self, image_name: str) -> flask.Response: # pylint: disable=no-self-use
|
||||
"""Retrieve an original source image"""
|
||||
if not flask.current_app.appconfig.expose_source:
|
||||
raise RuntimeError
|
||||
|
||||
with database.interface.atomic():
|
||||
image = database.ImageRecord.get(database.ImageRecord.name == image_name)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user