use of org.olat.resource.accesscontrol.model.AccessMethodSecurityCallback in project OpenOLAT by OpenOLAT.
the class ACFrontendManager method getAvailableMethods.
@Override
public List<AccessMethod> getAvailableMethods(Identity identity, Roles roles) {
List<AccessMethod> methods = methodManager.getAvailableMethods();
List<AccessMethod> allowedMethods = new ArrayList<>();
for (AccessMethod method : methods) {
AccessMethodHandler handler = accessModule.getAccessMethodHandler(method.getType());
AccessMethodSecurityCallback secCallback = handler.getSecurityCallback(identity, roles);
if (secCallback.canUse()) {
allowedMethods.add(method);
}
}
return methods;
}
use of org.olat.resource.accesscontrol.model.AccessMethodSecurityCallback in project openolat by klemens.
the class ACFrontendManager method getAvailableMethods.
@Override
public List<AccessMethod> getAvailableMethods(Identity identity, Roles roles) {
List<AccessMethod> methods = methodManager.getAvailableMethods();
List<AccessMethod> allowedMethods = new ArrayList<>();
for (AccessMethod method : methods) {
AccessMethodHandler handler = accessModule.getAccessMethodHandler(method.getType());
AccessMethodSecurityCallback secCallback = handler.getSecurityCallback(identity, roles);
if (secCallback.canUse()) {
allowedMethods.add(method);
}
}
return methods;
}
Aggregations