use of org.apache.nifi.registry.authorization.Permissions in project nifi-registry by apache.
the class PermissionsService method createPermissionsForBucketId.
private Permissions createPermissionsForBucketId(String bucketId, final Permissions knownPermissions) {
Authorizable bucketResource = authorizableLookup.getBucketAuthorizable(bucketId);
Permissions permissions = knownPermissions == null ? authorizationService.getPermissionsForResource(bucketResource) : authorizationService.getPermissionsForResource(bucketResource, knownPermissions);
return permissions;
}
use of org.apache.nifi.registry.authorization.Permissions in project nifi-registry by apache.
the class PermissionsService method populateBucketPermissions.
public void populateBucketPermissions(final Iterable<Bucket> buckets) {
Permissions topLevelBucketPermissions = authorizationService.getPermissionsForResource(authorizableLookup.getBucketsAuthorizable());
buckets.forEach(b -> populateBucketPermissions(b, topLevelBucketPermissions));
}
use of org.apache.nifi.registry.authorization.Permissions in project nifi-registry by apache.
the class PermissionsService method populateItemPermissions.
private void populateItemPermissions(final BucketItem bucketItem, final Permissions knownPermissions) {
if (bucketItem == null) {
return;
}
Permissions bucketItemPermissions = createPermissionsForBucketId(bucketItem.getBucketIdentifier(), knownPermissions);
bucketItem.setPermissions(bucketItemPermissions);
}
Aggregations