Skip to content

Commit

Permalink
get the permissions right for the proposal store
Browse files Browse the repository at this point in the history
  • Loading branch information
pahjbo committed Nov 4, 2024
1 parent 5bd134c commit cfca2bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/main/java/org/orph2020/pst/AppLifecycleBean.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public class AppLifecycleBean {
@Transactional
void onStart(@Observes StartupEvent ev) {
LOGGER.info("The application is starting...");
LOGGER.info("initializing Database");

Long i = em.createQuery("select count(o) from Observatory o", Long.class).getSingleResult();
if(i.intValue() == 0) {

LOGGER.info("initializing Database");
// add the example proposals.
FullExample fullExample = new FullExample();
List<ProposalCycle> cycles = fullExample.getManagementModel().getContent(ProposalCycle.class);
Expand All @@ -61,10 +61,11 @@ void onStart(@Observes StartupEvent ev) {
}
fullExample.saveTodB(em);

ObservingProposal pr = fullExample.getProposalModel().getContent(ObservingProposal.class).get(0);

//here we create document store directories that would be normally created
// in the implementation of API call "createProposal"
// FIXME not sure if justifications are copied too...
// FIXME
for(ObservingProposal pr: fullExample.getProposalModel().getContent(ObservingProposal.class))
try {
Files.createDirectories(Paths.get(
documentStoreRoot,
Expand All @@ -87,6 +88,7 @@ void onStart(@Observes StartupEvent ev) {
"technical"
));
} catch (IOException e) {
LOGGER.error(e);
throw new RuntimeException(e);
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ keycloak.admin-password=admin
quarkus.kubernetes.mounts.pst-document-store.path=/documentStore
quarkus.kubernetes.pvc-volumes.pst-document-store.claim-name=pst-document-store
%prod.supporting-documents.store-root=/documentStore/

quarkus.kubernetes.security-context.run-as-user=185
quarkus.kubernetes.security-context.run-as-group=185
quarkus.kubernetes.security-context.fs-group=185

#Maximum size of an individual request, i.e. max size of a supporting document
quarkus.http.limits.max-body-size=100M
Expand Down

0 comments on commit cfca2bb

Please sign in to comment.