Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sipi): Don't expect API v1 status code (DSP-1114) #1763

Merged
merged 14 commits into from Dec 4, 2020
6 changes: 0 additions & 6 deletions sipi/config/sipi.init-knora.lua
Expand Up @@ -115,14 +115,8 @@ function pre_flight(prefix, identifier, cookie)
return 'deny'
end

server.log("pre_flight - status: " .. response_json.status, server.loglevel.LOG_DEBUG)
server.log("pre_flight - permission code: " .. response_json.permissionCode, server.loglevel.LOG_DEBUG)

if response_json.status ~= 0 then
-- something went wrong with the request, Knora returned a non zero status
return 'deny'
end

if response_json.permissionCode == 0 then
-- no view permission on file
return 'deny'
Expand Down
Expand Up @@ -45,7 +45,7 @@ case class SipiFileInfoGetRequestADM(projectID: String,
requestingUser: UserADM) extends SipiResponderRequestADM

/**
* Represents the Knora API v1 JSON response to a request for a information about a `FileValue`.
* Represents the JSON response to a request for a information about a `FileValue`.
*
* @param permissionCode a code representing the user's maximum permission on the file.
* @param restrictedViewSettings the project's restricted view settings.
Expand Down