Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static AccessModels createFromString(String asString) {
} else if ("whitelist".equals(asString)) {
return whitelist;
}
return whitelist;
return authorize;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,18 @@ public boolean canViewNode(String node, Affiliations affilliation,
return openChannelAcl(node, subscription, affilliation);
} else if (accessModel.toString().equals(AccessModels.authorize.toString())) {
return privateChannelAcl(node, subscription, affilliation);
}
} else if (accessModel.toString().equals(AccessModels.whitelist.toString())) {
return whitelistAcl(node, subscription, affilliation);
}
throw new InvalidParameterException(INVALID_ACCESS_MODEL);
}

private boolean privateChannelAcl(String node, Subscriptions subscription,
private boolean whitelistAcl(String node, Subscriptions subscription, Affiliations affilliation) {
LOGGER.trace("Whitelist not implemented, returning equivalent of authorized");
return privateChannelAcl(node, subscription, affilliation);
}

private boolean privateChannelAcl(String node, Subscriptions subscription,
Affiliations affilliation) {
if (Subscriptions.none.toString().equals(subscription.toString())) {
reasonForRefusal = new NodeAclRefuseReason(PacketError.Type.auth,
Expand Down