Skip to content

Commit

Permalink
Merge branch 'main' into feature/improve-docker-layers
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed Dec 9, 2024
2 parents afcbc22 + a97110f commit d47ed20
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ jobs:
- name: Build with Gradle
uses: gradle/gradle-build-action@v3
env:
GITHUB_DEPLOY_USER: "${{ secrets.DEPLOY_USER }}"
GITHUB_DEPLOY_TOKEN: "${{ secrets.DEPLOY_TOKEN }}"
ORG_GRADLE_PROJECT_deployUsername: ${{ secrets.DEPLOY_USER }}
ORG_GRADLE_PROJECT_deployToken: ${{ secrets.DEPLOY_TOKEN }}
ORG_GRADLE_PROJECT_deplyRepository: ${{ secrets.DEPLOY_REPOSITORY }}
GITHUB_DEPLOY_USER: ${{ github.actor }}
GITHUB_DEPLOY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_DEPLOY_REPOSITORY: ${{ secrets.DEPLOY_REPOSITORY }}
with:
gradle-version: 8.0.2
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ jobs:
gradle-version: 8.0.2
arguments: createRelease
env:
GITHUB_DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
GITHUB_DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
ORG_GRADLE_PROJECT_deployUsername: ${{ secrets.DEPLOY_USER }}
ORG_GRADLE_PROJECT_deployToken: ${{ secrets.DEPLOY_TOKEN }}
ORG_GRADLE_PROJECT_deplyRepository: ${{ secrets.DEPLOY_REPOSITORY }}
GITHUB_DEPLOY_USER: ${{ github.actor }}
GITHUB_DEPLOY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_DEPLOY_REPOSITORY: ${{ secrets.DEPLOY_REPOSITORY }}

- name: Upload descriptor file artifact
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@
hs_err_pid*
/bin/
/.gradle/
/libs/
/dependences/
/build/
*.properties
*.properties
# skip folder dependencies
!dependencies/*.jar
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repositories {
// Adempiere GitHub Organization
url = 'https://maven.pkg.github.com/adempiere/adempiere'
credentials {
// project property, system properrty, enviroment variable
// project property, system property, enviroment variable
username = findProperty("deployUsername") ?: System.properties['deploy.user'] ?: System.getenv("GITHUB_DEPLOY_USER")
password = findProperty("deployToken") ?: System.properties['deploy.token'] ?: System.getenv("GITHUB_DEPLOY_TOKEN")
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/spin/processor/service/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
************************************************************************************/
package org.spin.processor.service;

import java.util.Optional;

import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MProcess;
import org.compiere.model.MRole;
Expand Down Expand Up @@ -78,7 +80,7 @@ private static RunProcessorResponse.Builder runProcess(int processId, String par
if(process == null || process.getAD_Process_ID() <= 0) {
throw new AdempiereException("@AD_Process_ID@ @NotFound@");
}
if(!MRole.getDefault().getProcessAccess(process.getAD_Process_ID())) {
if(!Optional.ofNullable(MRole.getDefault().getProcessAccess(process.getAD_Process_ID())).orElse(false)) {
if (process.isReport()) {
throw new AdempiereException("@AccessCannotReport@");
}
Expand Down

0 comments on commit d47ed20

Please sign in to comment.