use of nl.knaw.huygens.timbuctoo.security.dto.VreAuthorization in project timbuctoo by HuygensING.
the class LocalFileVreAuthorizationAccess method getAuthorization.
@Override
public Optional<VreAuthorization> getAuthorization(String vreId, String userId) throws AuthorizationUnavailableException {
Optional<VreAuthorization> authorizationValue = Optional.empty();
File file = getFileOfVre(vreId);
authorizationValue = getAuthorization(userId, authorizationValue, file);
if (!authorizationValue.isPresent()) {
file = authorizationsFolder.resolve("authorizations.json").toFile();
authorizationValue = getAuthorization(userId, authorizationValue, file);
}
return authorizationValue;
}
Aggregations