Skip to main content
4-Participant
January 14, 2025
Question

Checking for create Access for soecific object type is not working

  • January 14, 2025
  • 3 replies
  • 465 views
boolean hasdomainAccess =AccessControlHelper.manager.hasAccess(user, "com.infineon.ProductDevelopmentReport", container.getDefaultDomainReference(), _State.toState("INWORK"),
AccessPermission.CREATE);

Here it always return true even there is no access to create for the user while implementing validation in the builder

3 replies

avillanueva
23-Emerald I
23-Emerald I
January 14, 2025

What does debug logging on that hasAccess method say?

HelesicPetr
22-Sapphire II
22-Sapphire II
January 15, 2025

Hi @TP_10729144 

I would say that it works. 

You just need to get all access that are defined on that object type. 

Go to ACL manager, get all domains, and search for the type. 

You would find that the permission is defined somewhere.

It is not easy because it depends on many criteria as state, domain level, roles groups and so on.

You just do not know where the definition is set. 

 

I would recommend to try to find the existing object in the specific state, and use the Edit Access Control function to get information you need by UI

HelesicPetr_0-1736937078622.png

Search the specific user and add him to the table and get the detail information

HelesicPetr_1-1736937115062.png

HelesicPetr_2-1736937143024.png

HelesicPetr_3-1736937222956.png

 

PetrH

 

 

 

Catalina
Community Moderator
January 21, 2025

Hi @TP_10729144,

 

I wanted to see if you got the help you needed.

 

If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.

 

Of course, if you have more to share on your issue, please pursue the conversation.

 

Thanks,

Catalina | PTC Community Moderator