diff --git a/server/src/main/java/com/soulfiremc/server/grpc/ConfigServiceImpl.java b/server/src/main/java/com/soulfiremc/server/grpc/ConfigServiceImpl.java index d5686ec5..5ecd215f 100644 --- a/server/src/main/java/com/soulfiremc/server/grpc/ConfigServiceImpl.java +++ b/server/src/main/java/com/soulfiremc/server/grpc/ConfigServiceImpl.java @@ -41,6 +41,7 @@ public class ConfigServiceImpl extends ConfigServiceGrpc.ConfigServiceImplBase { private Collection getGlobalPermissions() { var user = ServerRPCConstants.USER_CONTEXT_KEY.get(); return Arrays.stream(GlobalPermission.values()) + .filter(permission -> permission != GlobalPermission.UNRECOGNIZED) .map(permission -> GlobalPermissionState.newBuilder() .setGlobalPermission(permission) .setGranted(user.hasPermission(PermissionContext.global(permission))) diff --git a/server/src/main/java/com/soulfiremc/server/grpc/InstanceServiceImpl.java b/server/src/main/java/com/soulfiremc/server/grpc/InstanceServiceImpl.java index f3dbdeb8..738dd555 100644 --- a/server/src/main/java/com/soulfiremc/server/grpc/InstanceServiceImpl.java +++ b/server/src/main/java/com/soulfiremc/server/grpc/InstanceServiceImpl.java @@ -41,6 +41,7 @@ public class InstanceServiceImpl extends InstanceServiceGrpc.InstanceServiceImpl private Collection getInstancePermissions(UUID instanceId) { var user = ServerRPCConstants.USER_CONTEXT_KEY.get(); return Arrays.stream(InstancePermission.values()) + .filter(permission -> permission != InstancePermission.UNRECOGNIZED) .map(permission -> InstancePermissionState.newBuilder() .setInstancePermission(permission) .setGranted(user.hasPermission(PermissionContext.instance(permission, instanceId)))