Skip to content

Commit

Permalink
Allow case edit for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
rgwch committed Aug 21, 2024
1 parent fc584d3 commit 30be73b
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006-2011, G. Weirich and Elexis
* Copyright (c) 2006-2024, G. Weirich and Elexis
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -1010,7 +1010,11 @@ public void setFall(final IFall f) {
}

if (lockUpdate) {
setUnlocked(LocalLockServiceHolder.get().isLockedLocal(actFall));
if (AccessControlServiceHolder.get().evaluate(EvACE.of(ICoverage.class, Right.UPDATE))) {
setUnlocked(false);
} else {
setUnlocked(LocalLockServiceHolder.get().isLockedLocal(actFall));
}
}
}

Expand Down Expand Up @@ -1059,8 +1063,12 @@ private void allowFieldUpdate(boolean lockEnabled) {
}
costBearerEnabled = !BillingSystem.isCostBearerDisabled(actFall.getAbrechnungsSystem());
}

boolean enable = lockEnabled && (noExistingInvoicesForThisCoverage || invoiceCorrection);
boolean enable = false;
if (AccessControlServiceHolder.get().evaluate(EvACE.of(ICoverage.class, Right.UPDATE))) {
enable = true;
} else {
enable = lockEnabled && (noExistingInvoicesForThisCoverage || invoiceCorrection);
}

tBezeichnung.setEditable(lockEnabled);

Expand Down

0 comments on commit 30be73b

Please sign in to comment.