提交 7b1ef8f3 编写于 作者: S Scruel Tao 提交者: Hu Zongtang

[ISSUE #1086] Fix NullPointerException in PlainPermissionLoader if permissions...

[ISSUE #1086] Fix NullPointerException in PlainPermissionLoader if permissions are not configured(with admin user)
上级 40779bf2
......@@ -123,12 +123,17 @@ public class PlainPermissionLoader {
return;
}
if (ownedPermMap == null && ownedAccess.isAdmin()) {
// If the ownedPermMap is null and it is an admin user, then return
return;
}
for (Map.Entry<String, Byte> needCheckedEntry : needCheckedPermMap.entrySet()) {
String resource = needCheckedEntry.getKey();
Byte neededPerm = needCheckedEntry.getValue();
boolean isGroup = PlainAccessResource.isRetryTopic(resource);
if (!ownedPermMap.containsKey(resource)) {
if (ownedPermMap == null || !ownedPermMap.containsKey(resource)) {
// Check the default perm
byte ownedPerm = isGroup ? ownedAccess.getDefaultGroupPerm() :
ownedAccess.getDefaultTopicPerm();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册