# DevConnect Limit API Product by Role module issue

**URL:** <https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496>\
**Category:** Apigee\
**Tags:** developer-portal\
**Created:** [February 28, 2019, 6:34am UTC](https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496 "2019-02-28T06:34:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![API-Evangelist](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/api-evangelist/32/7651_2.png) [@API-Evangelist](https://discuss.google.dev/u/API-Evangelist)\
**Post date:** [February 28, 2019, 6:34am UTC](https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496/1 "2019-02-28T06:34:59Z")

</div>

We are using 4.18.05 dev portal and observed **DevConnect Limit API Product by Role** module doesn’t work. It is somekind of UI bug which it never saves properly and doesn’t enable the product to allocated user(as per the role).

Similar question was asked in below post

[https://community.apigee.com/questions/23910/is-it-possible-to-retrict-list-of-products-in-the.html](https://community.apigee.com/questions/23910/is-it-possible-to-retrict-list-of-products-in-the.html)

Any work around?

Support Case # 1459748 opened(providing the snapshots) and waiting on support response.

Thanks.

---

<div class="post-metadata">

**Author:** ![API-Evangelist](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/api-evangelist/32/7651_2.png) [@API-Evangelist](https://discuss.google.dev/u/API-Evangelist)\
**Post date:** [February 28, 2019, 5:54pm UTC](https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496/2 "2019-02-28T17:54:14Z")

</div>

Did any one experienced the issue & is there a work around ?

---

<div class="post-metadata">

**Author:** ![dchiesa1](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/dchiesa1/32/15641_2.png) [@dchiesa1](https://discuss.google.dev/u/dchiesa1)\
**Post date:** [February 28, 2019, 6:45pm UTC](https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496/3 "2019-02-28T18:45:46Z")

</div>

UPDATE 2019 March 4

The behavior you are seeing is the result of a bug in the DevConnect Limit API Product by Role module. There is an alternative module that allows you to work around the bug.

Get it here, from my repo:

[https://github.com/DinoChiesa/Edge-DevPortal-ApiProducts-Access-Extended](https://github.com/DinoChiesa/Edge-DevPortal-ApiProducts-Access-Extended)

I cannot directly fix the \_original\_module. I have filed a bug.

* * *

ORIGINAL ANSWER

Maybe try this module?

[https://github.com/DinoChiesa/Edge-DevPortal-ApiProducts-Access-Extended](https://github.com/DinoChiesa/Edge-DevPortal-ApiProducts-Access-Extended)

It originated as a fork of the builtin devconnect API Product Access module.

The “extended” module supplants the original module, provides a few enhancements and improvements.

- “default” access for an API Product.
- better Admin UI form

If you use this module, you should disable the other module.

##

---

<div class="post-metadata">

**Author:** ![API-Evangelist](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/api-evangelist/32/7651_2.png) [@API-Evangelist](https://discuss.google.dev/u/API-Evangelist)\
**Post date:** [February 28, 2019, 11:08pm UTC](https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496/4 "2019-02-28T23:08:06Z")

</div>

Tried the new module and see same UI issue.Updated the case with snapshots.

---

<div class="post-metadata">

**Author:** ![dchiesa1](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/dchiesa1/32/15641_2.png) [@dchiesa1](https://discuss.google.dev/u/dchiesa1)\
**Post date:** [March 1, 2019, 12:13am UTC](https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496/5 "2019-03-01T00:13:58Z")

</div>

What do you mean by “same UI issue” ?

I am looking at a screen that shows “The configuration options have been saved”.

What leads you to conclude that the save particularly is not working? Are you saying that it is impossible to tick the box next to one of the products? Are you saying that you tick the box, but after saving, the box becomes unticked again? I’m not clear.

Some suggestions:

1. Judging from the screenshot, when you use the Extended Access control module, you also need to tick the box that says “Access check enabled”. This is the master switch. You need to turn it on! 🙂  
Also, be sure to disable the other module if you choose to use this one.
2. In either case, whether you use the original module or the extended one, turn off caching or “flush all caches” in Drupal before testing it out.

---

<div class="post-metadata">

**Author:** ![API-Evangelist](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/api-evangelist/32/7651_2.png) [@API-Evangelist](https://discuss.google.dev/u/API-Evangelist)\
**Post date:** [March 1, 2019, 1:31am UTC](https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496/6 "2019-03-01T01:31:06Z")

</div>

Hello Dino,

Thanks for quick response..

When we choose product for administrator and internal role & choose save ,the box becomes unticked again.

Also when we choose Access check enabled after enabling product & perform flush all caches in drupal it doesn’t show at all to anyone.

If we untick “Access check enabled” it is visible to all ☹

Uploaded new snapshots to case as well..

-Vinay

---

<div class="post-metadata">

**Author:** ![dchiesa1](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/dchiesa1/32/15641_2.png) [@dchiesa1](https://discuss.google.dev/u/dchiesa1)\
**Post date:** [March 1, 2019, 2:35am UTC](https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496/7 "2019-03-01T02:35:32Z")

</div>

I think I see… I’ve reproduced the problem here. Maybe the product name that contains a dot and a dash is affecting the behavior of the UI. I will investigate.

---

<div class="post-metadata">

**Author:** ![dchiesa1](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/dchiesa1/32/15641_2.png) [@dchiesa1](https://discuss.google.dev/u/dchiesa1)\
**Post date:** [March 1, 2019, 2:57am UTC](https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496/8 "2019-03-01T02:57:18Z")

</div>

ok, Vinay. Can you get the latest updates of that “extended” module?

I was able to reproduce the problem here. I’ve made a change and now it works for me. I pushed that change to the github repo. You need to grab that change and then push that to your drupal site. Refresh all caches and then try again with the admin panel.

---

<div class="post-metadata">

**Author:** ![API-Evangelist](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/api-evangelist/32/7651_2.png) [@API-Evangelist](https://discuss.google.dev/u/API-Evangelist)\
**Post date:** [March 1, 2019, 7:11pm UTC](https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496/9 "2019-03-01T19:11:40Z")

</div>

Thanks Dino(you are just amazing). It works now. Appreciate your help.

---

<div class="post-metadata">

**Author:** ![dchiesa1](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/dchiesa1/32/15641_2.png) [@dchiesa1](https://discuss.google.dev/u/dchiesa1)\
**Post date:** [March 4, 2019, 7:10pm UTC](https://discuss.google.dev/t/devconnect-limit-api-product-by-role-module-issue/7496/10 "2019-03-04T19:10:49Z")

</div>

Glad to help. BTW, to get the fix you must use the extended module (from my repo).

I cannot fix the \_other\_module. I will file a bug, though.
