# Bug : is not authorized to browse on collection workStudyDashboardUsers

**URL:** <https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106>\
**Category:** Help me!\
**Created:** [May 22, 2025, 9:55am UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106 "2025-05-22T09:55:28Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![XavierColombel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/xaviercolombel/32/106_2.png) [@XavierColombel](https://community.forestadmin.com/u/XavierColombel)\
**Post date:** [May 22, 2025, 9:55am UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106/1 "2025-05-22T09:55:28Z")

</div>

## Observed behavior

I can’t browse workStudyDashboardUsers in input.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/b/b92576ead817c911ac820bcbc05a10ef07ddacb0.png)

## Failure Logs

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/d/dfb2669a3379511de08cf0e9fbd94ae06ffa10f5.png)

## Context

- Project name: lereacteur-admin

- Team name: Operations

- Database type: Mongo

- Agent technology: node

The user has all authorization on all collections, that’s why it’s a problem.

---

<div class="post-metadata">

**Author:** ![anon7284711](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anon7284711](https://community.forestadmin.com/u/anon7284711)\
**Post date:** [May 22, 2025, 10:32am UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106/2 "2025-05-22T10:32:57Z")

</div>

Hello @XavierColombel,

I would suspect that this is due to permission cache not refreshed on your agent.  
You can restart your agent to refresh the cache, if the user is then permitted to browse we can safely assume that was the case.

The out of date cache is probably caused by the strategy of SSE coupled with reverse proxies that will buffer those events.You can find out more about it on this [troubleshooting page](https://docs.forestadmin.com/developer-guide-agents-nodejs/getting-started/install/troubleshooting#invalid-permissions).

---

<div class="post-metadata">

**Author:** ![XavierColombel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/xaviercolombel/32/106_2.png) [@XavierColombel](https://community.forestadmin.com/u/XavierColombel)\
**Post date:** [May 22, 2025, 10:52am UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106/3 "2025-05-22T10:52:54Z")

</div>

I’ve restarted all dyno yet, clear the cache, but no change.

The strange thing is that it’s working on dev mode (local).

Any hint ?

---

<div class="post-metadata">

**Author:** ![anon7284711](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anon7284711](https://community.forestadmin.com/u/anon7284711)\
**Post date:** [May 22, 2025, 12:33pm UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106/4 "2025-05-22T12:33:41Z")

</div>

Dev environments do not use permissions so sadly it’s not a lead.  
I have refreshed the cached permission of your agent on our server, could you please retry ?

I’m failing to see a potential lead, for now. If that doesn’t work either could you update your agent version as I see a few patches concerning permissions.

---

<div class="post-metadata">

**Author:** ![XavierColombel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/xaviercolombel/32/106_2.png) [@XavierColombel](https://community.forestadmin.com/u/XavierColombel)\
**Post date:** [May 22, 2025, 1:14pm UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106/5 "2025-05-22T13:14:52Z")

</div>

It doesn’t work any better. I’ve update the agent.

I saw I couldn’t even delete certain documents (even in dev mode).

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/c/c43027c40018866aa1b2a3a512503383335ce0cc.png)

I don’t understand because I didn’t change anything.

---

<div class="post-metadata">

**Author:** ![anon7284711](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anon7284711](https://community.forestadmin.com/u/anon7284711)\
**Post date:** [May 23, 2025, 7:56am UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106/6 "2025-05-23T07:56:32Z")

</div>

Hello @XavierColombel,

Does this happen on any other collection or user ?  
Do you have a date/time when you first encountered this error ?

---

<div class="post-metadata">

**Author:** ![anon7284711](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anon7284711](https://community.forestadmin.com/u/anon7284711)\
**Post date:** [May 23, 2025, 10:01am UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106/7 "2025-05-23T10:01:14Z")

</div>

Could you provide a [jam.dev](https://jam.dev/) with a reproduction of your issues, you can send it to me privately if you do not wish for it to be publicly accessible 🙏

---

<div class="post-metadata">

**Author:** ![XavierColombel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/xaviercolombel/32/106_2.png) [@XavierColombel](https://community.forestadmin.com/u/XavierColombel)\
**Post date:** [May 23, 2025, 10:45am UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106/8 "2025-05-23T10:45:26Z")

</div>

I’ve just sent you the Jam.

---

<div class="post-metadata">

**Author:** ![anon7284711](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anon7284711](https://community.forestadmin.com/u/anon7284711)\
**Post date:** [May 23, 2025, 1:21pm UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106/9 "2025-05-23T13:21:12Z")

</div>

From the jam.dev you have shared at least for the deletion that pops out an error, it seems that the error is not due to Forest Admin permission but one of your custom Forbidden errors:

```javascript
  "errors": [
    {
      "detail": "Vous devez supprimer un contrat d'alternance depuis sa fiche uniquement, et non depuis la liste."
    }
  ]
}

```

It seems that your custom error is being swallowed by the error handling in the Frontend and displaying a generic error popup.  
I’ll create a bug ticket for this one.

I’m still looking for a cause of the ForbiddenError on the browse action on the `WorkStudyDashboardUsers` collection, do you happen to have any custom code on the route definition of the agent or its `PermissionMiddlewareCreator` ?

---

<div class="post-metadata">

**Author:** ![XavierColombel](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/xaviercolombel/32/106_2.png) [@XavierColombel](https://community.forestadmin.com/u/XavierColombel)\
**Post date:** [May 23, 2025, 3:29pm UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106/10 "2025-05-23T15:29:42Z")

</div>

Wow yes, well done, you’re right, the original error was swallowed!

I send you the new Jam in private.

---

<div class="post-metadata">

**Author:** ![nbouliol](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/nbouliol/32/5777_2.png) [@nbouliol](https://community.forestadmin.com/u/nbouliol)\
**Post date:** [June 9, 2025, 12:39pm UTC](https://community.forestadmin.com/t/bug-is-not-authorized-to-browse-on-collection-workstudydashboardusers/8106/11 "2025-06-09T12:39:23Z")

</div>

Hello @XavierColombel

Your error should now be displayed as intended

Nicolas
