code: @Override
      public Set<Permission> authorize(AuthenticatedUser user, IResource resource)
      {
          if (!(resource instanceof DataResource))
              throw new IllegalArgumentException(String.format("%s resource is not supported by LegacyAuthorizer", resource.getName()));
          DataResource dr = (DataResource) resource;
  
          List<Object> legacyResource = new ArrayList<Object>();
          legacyResource.add(Resources.ROOT);
          legacyResource.add(Resources.KEYSPACES);
          if (!dr.isRootLevel())
              legacyResource.add(dr.getKeyspace());
          if (dr.isColumnFamilyLevel())
              legacyResource.add(dr.getColumnFamily());
  
          Set<Permission> permissions = authorize(user, legacyResource);
          if (permissions.contains(Permission.READ))
              permissions.add(Permission.SELECT);
          if (permissions.contains(Permission.WRITE))
              permissions.addAll(EnumSet.of(Permission.CREATE, Permission.ALTER, Permission.DROP, Permission.MODIFY));
  
          return permissions;
      }
docs: Translates new-style authorize() method call to the old-style (including permissions and the hierarchy).