Could not find BeanMetadata with identifier: PathBasedPermission-1

Hello LEAF,

I am trying to put a Permission to my service and using the example of LKB:
https://docs.leidos-leaf.com/framework/java/modules/file-service/authorization/file-authorization-policy-path-based/

because this is literally what i want to add.

When starting the Service i got the Error stated in the title.
I am working with Version 3.10 if this helps.

When i look through the external libraries in intellij under com.leidos.leaf.module.file.service.authorization.policy.resources.constants.metadata;
I can find MetadataTypes with PathBasedPermission in it.

The Error also states:
[Note that this could be due to the entities not existing, or the User having insufficient permission to access them.]

But i think in the backend there should be the permission to access the BeanMetaData or am i wrong here?

Does someone have a Tip for me?

Hi Frank,

Did you upsert the necessary resources using something similar to the following:
dataService.upsertResources(CoreResourceDescriptors.FILE_AUTHORIZATION, Context.makeSystemContext());

If that’s not it, would you mind posting the full error if you haven’t?

2 Likes

That was the Problem :slight_smile: Must have overread that point.

Thank you