3

I'm writing a component for which I'd like to implement some additional restrictions on actions. For example, I want administrators to be able to view user details, but restrict some sensitive information to a specific group of administrators. For this special right, I've defined an additional action core.view.sensitive:

<action name="core.admin" title="..." description="..." /> 
<action name="core.view" title="..." description="..." /> 
<action name="core.view.sensitive" title="..." description="..." /> 

I'm trying to follow conventions here, but what is the purpose of the dot-notation for the action names? Is there some implicit hierarchy I'm not aware of? Do all users with the right to action core.view, automatically also get core.view.sensitive (or vice versa)? Of is it all just for aesthetics?

1
  • Please take our tour while you wait for support/feedback. May 5, 2022 at 23:13

1 Answer 1

1

As far as I can tell, it currently makes no difference in terms of code. So it is only a human readable way of indicating hierarchy. Be aware that you can't use whitespaces and hyphens in action names because these are stripped out by Access library.

1
  • I've tried to figure out how rights are being saved and edited and I think that you're right. So there is no correlation between the dot-notation and any form or hierarchy. Thanks May 7, 2022 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.