code: @Override
      public void checkPermission(Permission permission, AddOnModel addon) throws IzouPermissionException {
          if (isRegistered(addon))
              return;
  
          if (permission instanceof FilePermission && !permission.getActions().intern().toLowerCase().equals("read")) {
              String canonicalName = permission.getName().intern().toLowerCase();
              getSecurityManager().getPermissionManager().getFilePermissionModule().fileWriteCheck(canonicalName, addon);
          }
  
          Function<PluginDescriptor, Boolean> checkPermission = descriptor -> {
              try {
                  return descriptor.getAddOnProperties().get("root").equals("true");
              } catch (NullPointerException e) {
                  return false;
              }
          };
  
          String exceptionMessage = "Root permission denied for: " + addon + "is not registered to "
                  + "use socket root connections.";
          registerOrThrow(addon, () -> new IzouSocketPermissionException(exceptionMessage), checkPermission);
      }
docs: Checks if the given addOn is allowed to access the requested service and registers them if not yet registered.
  
  @param permission the Permission to check
  @param addon      the identifiable to check
  @throws IzouPermissionException thrown if the addOn is not allowed to access its requested service