use of org.apache.ignite.plugin.security.SecurityPermissionSet in project ignite by apache.
the class CacheOperationPermissionCreateDestroyCheckTest method testCreateCacheWithSystemPermissions.
/**
*/
@Test
public void testCreateCacheWithSystemPermissions() throws Exception {
SecurityPermissionSet secPermSet = builder().appendSystemPermissions(CACHE_CREATE).build();
try (Ignite node = startGrid(TEST_NODE, secPermSet, clientMode)) {
assertThrowsWithCause(() -> forbidden(clientMode).createCache(CACHE_NAME), SecurityException.class);
assertNotNull(node.createCache(CACHE_NAME));
}
}
Aggregations