Use Forge default resolver when result is undefined (#3390)

This commit is contained in:
IzzelAliz 2022-06-07 01:39:13 +08:00 committed by GitHub
parent 62a8891b48
commit a368509520
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,7 +115,9 @@ public class ForgePermissionHandler implements IPermissionHandler {
if (node.getType() == PermissionTypes.BOOLEAN) {
PermissionCache cache = user.getCachedData().getPermissionData(queryOptions);
Tristate value = cache.checkPermission(node.getNodeName(), CheckOrigin.PLATFORM_API_HAS_PERMISSION).result();
return (T) (Boolean) value.asBoolean();
if (value != Tristate.UNDEFINED) {
return (T) (Boolean) value.asBoolean();
}
}
if (node.getType() == PermissionTypes.INTEGER) {