public void grantStorageVolumeUsageToPublicRole(String storageVolumeId) throws PrivilegeException {
        List<PEntryObject> object = Collections.singletonList(new StorageVolumePEntryObject(storageVolumeId));
        grantToRole(ObjectType.STORAGE_VOLUME, Collections.singletonList(PrivilegeType.USAGE), object, false,
                PrivilegeBuiltinConstants.PUBLIC_ROLE_NAME);
    }
@Test
    public void testGrantStorageVolumeUsageToPublicRole() throws Exception {
        DDLStmtExecutor.execute(UtFrameUtils.parseStmtWithNewParser("create user u1", ctx), ctx);

        AuthorizationMgr manager = ctx.getGlobalStateMgr().getAuthorizationMgr();
        List<String> locations = Arrays.asList("s3://abc");
        Map<String, String> storageParams = new HashMap<>();
        storageParams.put(AWS_S3_REGION, "region");
        storageParams.put(AWS_S3_ENDPOINT, "endpoint");
        storageParams.put(AWS_S3_USE_AWS_SDK_DEFAULT_BEHAVIOR, "true");
        String storageVolumeId = ctx.getGlobalStateMgr().getStorageVolumeMgr()
                .createStorageVolume("test", "S3", locations, storageParams, Optional.empty(), "");
        manager.grantStorageVolumeUsageToPublicRole(storageVolumeId);
        setCurrentUserAndRoles(ctx, new UserIdentity("u1", "%"));
        new NativeAccessController().checkStorageVolumeAction(ctx.getCurrentUserIdentity(), ctx.getCurrentRoleIds(),
                "test", PrivilegeType.USAGE);
    }