Environments Index API returns forbidden (403) when a user has access to some environments (not all).
with the following role:
<role name="xyz">
<users>
<user>view</user>
</users>
<policy>
<allow action="administer" type="environment">foo*</allow>
</policy>
</role>
view.Environment Index API should return all the environments with matching name foo*
Environment Index API returns 403
@gocd/committers @arvindsv @adityasood -- What should be the expected behavior?
IMO, the answer depends on what we consider as an operational entity. Whether an API endpoint is an entity or a single environment?
foo*I vote for 200. As a user, they don't see the API endpoint as an entity. The entities are the individual environments they have access to. It shouldn't matter to them that there are other environments they don't know about.
Verified on 19.11.0 (10687-c532a61bb240ffbe59fe356445bea6433005563f)
Most helpful comment
I vote for
200. As a user, they don't see the API endpoint as an entity. The entities are the individual environments they have access to. It shouldn't matter to them that there are other environments they don't know about.