I am trying to impose role based access on APIs using Content Access Module. I have created a smartDocs model for the APIs using Swagger specification. Once the model is published, I have enabled role based access on the page settings for a custom role.
As an anonymous user when I view /{smartDocs-model}/apis I get access denied error.
So far good...
But when I directly test a particular page say - /{smartDocs-model}/apis/get/{api-uri} as an anonymous user I can still view the page.
I have disabled access to anonymous users at both content type (admin/structure/types/manage/smart_method/access) and at node level (/node/91/access).
But still anonymous users can view the individual API pages. How can I ensure that access is denied to anonymous user for these pages?
So far i have used following links:
Thanks in advance!!
Solved! Go to Solution.
Hi @Vikaas - I tested it out, and I ran into the same issue. The fix is to rebuild permissions after you change them in the Content Access module. To do this:
That worked for me. Hope it does for you, too.
P.S. Found the answer in this thread: https://www.drupal.org/node/1344622
Hi @Vikaas - I tested it out, and I ran into the same issue. The fix is to rebuild permissions after you change them in the Content Access module. To do this:
That worked for me. Hope it does for you, too.
P.S. Found the answer in this thread: https://www.drupal.org/node/1344622
works like a charm!!
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |