Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Translate the entire conversation x

Checking for create Access for soecific object type is not working

TP_10729144
4-Participant

Checking for create Access for soecific object type is not working

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 3
avillanueva
22-Sapphire II
(To:TP_10729144)

What does debug logging on that hasAccess method say?

HelesicPetr
22-Sapphire II
(To:TP_10729144)

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

 

 

 

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
Announcements
Top Tags