Skip to content

Commit

Permalink
[26921] update ICategory rights check on omnivore import dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
huthomas committed Feb 7, 2025
1 parent 6b3d7b5 commit 7ea194a
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

import ch.elexis.core.ac.EvACE;
import ch.elexis.core.ac.Right;
import ch.elexis.core.model.ICategory;
import ch.elexis.core.services.holder.AccessControlServiceHolder;
import ch.elexis.core.ui.icons.Images;
import ch.elexis.core.ui.util.SWTHelper;
Expand Down Expand Up @@ -200,9 +201,12 @@ public void widgetSelected(SelectionEvent ev) {
tKeywords.setText(dh.getKeywords());
cbCategories.setText(dh.getCategory().getName());
}
bEditCat.setEnabled(AccessControlServiceHolder.get().evaluate(EvACE.of(IDocumentHandle.class, Right.UPDATE).and(Right.EXECUTE)));
bDeleteCat.setEnabled(AccessControlServiceHolder.get().evaluate(EvACE.of(IDocumentHandle.class, Right.DELETE).and(Right.EXECUTE)));
bNewCat.setEnabled(AccessControlServiceHolder.get().evaluate(EvACE.of(IDocumentHandle.class, Right.CREATE).and(Right.EXECUTE)));
bEditCat.setEnabled(
AccessControlServiceHolder.get().evaluate(EvACE.of(ICategory.class, Right.UPDATE)));
bDeleteCat.setEnabled(
AccessControlServiceHolder.get().evaluate(EvACE.of(ICategory.class, Right.DELETE)));
bNewCat.setEnabled(
AccessControlServiceHolder.get().evaluate(EvACE.of(ICategory.class, Right.CREATE)));

return ret;
}
Expand Down

0 comments on commit 7ea194a

Please sign in to comment.