use of com.hazelcast.config.OnJoinPermissionOperationName in project hazelcast by hazelcast.
the class YamlMemberDomConfigProcessor method handleSecurityPermissions.
@SuppressWarnings({ "checkstyle:npathcomplexity", "checkstyle:methodlength" })
protected void handleSecurityPermissions(Node node) {
String onJoinOp = getAttribute(node, "on-join-operation");
if (onJoinOp != null) {
OnJoinPermissionOperationName onJoinPermissionOperation = OnJoinPermissionOperationName.valueOf(upperCaseInternal(onJoinOp));
config.getSecurityConfig().setOnJoinPermissionOperation(onJoinPermissionOperation);
}
Iterable<Node> nodes = childElements(node);
for (Node child : nodes) {
String nodeName = cleanNodeName(child);
if (matches("on-join-operation", nodeName)) {
continue;
}
nodeName = matches("all", nodeName) ? nodeName + "-permissions" : nodeName + "-permission";
PermissionType type = PermissionConfig.PermissionType.getType(nodeName);
if (type == null) {
throw new InvalidConfigurationException("Security permission type is not valid " + nodeName);
}
if (PermissionConfig.PermissionType.CONFIG == type || PermissionConfig.PermissionType.ALL == type || PermissionConfig.PermissionType.TRANSACTION == type) {
handleSecurityPermission(child, type);
} else {
handleSecurityPermissionGroup(child, type);
}
}
}
use of com.hazelcast.config.OnJoinPermissionOperationName in project hazelcast by hazelcast.
the class MemberDomConfigProcessor method handleSecurityPermissions.
protected void handleSecurityPermissions(Node node) {
String onJoinOp = getAttribute(node, "on-join-operation");
if (onJoinOp != null) {
OnJoinPermissionOperationName onJoinPermissionOperation = OnJoinPermissionOperationName.valueOf(upperCaseInternal(onJoinOp));
config.getSecurityConfig().setOnJoinPermissionOperation(onJoinPermissionOperation);
}
for (Node child : childElements(node)) {
String nodeName = cleanNodeName(child);
PermissionType type = PermissionConfig.PermissionType.getType(nodeName);
if (type == null) {
throw new InvalidConfigurationException("Security permission type is not valid " + nodeName);
}
handleSecurityPermission(child, type);
}
}
Aggregations