I want to add links to the ADD pages in the “Custom File” section of my project. However, I only want these links to be visible to users who have the necessary permissions (e.g., the ADD permission).
If I want to add these links dynamically from an API using AJAX, will this security check code function correctly within the API context?
Let me be clearer…
I’m planning to add these ‘Add Page’ links dynamically via an API endpoint and AJAX. Will the provided security check (if (Security()->allowAdd(CurrentProjectID() . 'orders') && Security()->canAdd())) still accurately enforce permissions when executed within the API’s PHP code?