Skip to content
Snippets Groups Projects
Commit f2adc1eb authored by srosse's avatar srosse
Browse files

OO-1082: check if the group exists before anything else

parent 192ce20e
No related branches found
No related tags found
No related merge requests found
...@@ -104,6 +104,9 @@ public class GroupIndexer extends AbstractHierarchicalIndexer { ...@@ -104,6 +104,9 @@ public class GroupIndexer extends AbstractHierarchicalIndexer {
Long key = contextEntry.getOLATResourceable().getResourceableId(); Long key = contextEntry.getOLATResourceable().getResourceableId();
BusinessGroupService bgs = CoreSpringFactory.getImpl(BusinessGroupService.class); BusinessGroupService bgs = CoreSpringFactory.getImpl(BusinessGroupService.class);
BusinessGroup group = bgs.loadBusinessGroup(key); BusinessGroup group = bgs.loadBusinessGroup(key);
if(group == null) {
return false;
}
boolean inGroup = bgs.isIdentityInBusinessGroup(identity, group); boolean inGroup = bgs.isIdentityInBusinessGroup(identity, group);
if (inGroup) { if (inGroup) {
return super.checkAccess(contextEntry, businessControl, identity, roles) return super.checkAccess(contextEntry, businessControl, identity, roles)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment