# Role can't access record read detail configured

**URL:** <https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136>\
**Category:** Help me!\
**Created:** [January 31, 2022, 3:01pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136 "2022-01-31T15:01:04Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![timothyarmes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/timothyarmes/32/3450_2.png) [@timothyarmes](https://community.forestadmin.com/u/timothyarmes)\
**Post date:** [January 31, 2022, 3:01pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/1 "2022-01-31T15:01:04Z")

</div>

## Feature(s) impacted

Roles

## Observed behavior

We have created a new role with full read/write access to one specific table. When we assign that role to certain users then they can list the items in that table, but they can’t see the details of a given row.

## Expected behavior

The user should be able to see the details.

## Context

- Project name: Brxs
- Team name: Operations
- Environment name: Production

This problem is for the role “Marketing”

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [January 31, 2022, 3:10pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/2 "2022-01-31T15:10:17Z")

</div>

Hey @timothyarmes 👋

Could you confirm the project name?  
Also, according to the multiple project I can find, I can’t spot any roles, so the project name will be valuable in order to help. Thanks 🙏

---

<div class="post-metadata">

**Author:** ![timothyarmes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/timothyarmes/32/3450_2.png) [@timothyarmes](https://community.forestadmin.com/u/timothyarmes)\
**Post date:** [January 31, 2022, 3:14pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/3 "2022-01-31T15:14:01Z")

</div>

Hi,

I’ve updated my post to reflect the correct capitalisation (Brxs)

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [January 31, 2022, 3:18pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/4 "2022-01-31T15:18:30Z")

</div>

Thanks, I can now see your role configuration.

Could you also share:

- A user name that can’t access details informations?
- The specific collection you setup role onto?

Feel free to reach me as DM if you consider those private.

Thanks in advance 🙏

---

<div class="post-metadata">

**Author:** ![anon15528774](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@anon15528774](https://community.forestadmin.com/u/anon15528774)\
**Post date:** [February 1, 2022, 5:23pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/5 "2022-02-01T17:23:18Z")

</div>

Hello @timothyarmes

I could not reproduce the bug on my end and your configuration appears to be correct.

Could you share your production agent servers logs ?

Restarting your production agent server may also help.

Thanks 🙏

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [February 2, 2022, 4:29pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/6 "2022-02-02T16:29:45Z")

</div>

Hello @timothyarmes,

As @anon39848301 mentioned, could you share with us:

- A collection (table) name where you encounter the issue?
- A screencast of the bug encountered?

It would help us reproducing the issue / solve your case.  
Thanks!

---

<div class="post-metadata">

**Author:** ![timothyarmes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/timothyarmes/32/3450_2.png) [@timothyarmes](https://community.forestadmin.com/u/timothyarmes)\
**Post date:** [February 3, 2022, 7:02am UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/7 "2022-02-03T07:02:37Z")

</div>

Hi,

Sorry for the delay.

The collection is called Promocodes. In video you can see that I’m logged in using a test account (Testy Tim) which has the Marketing role. As such, I can see the collection. However, I can’t see the details when I click.

[FA\_Bug.tar](https://community.forestadmin.com/uploads/short-url/unu3HYh9jxJdBFLLbyKkCQtE7cf.tar) (946.2 KB)

I’m happy to do a zoom session with a developer to demo the issue live.

P.S. Could you allow uploading of .mov and .zip files here?

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [February 3, 2022, 9:29am UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/8 "2022-02-03T09:29:59Z")

</div>

Hi @timothyarmes,

Thanks a lot for your details.

Indeed, from what I can see, you should be able to see the details of this record.

Do you have any error in your browser console? In your server?  
Can you see the number of records on the Promocodes list? Or is it hidden and the pagination shows `1 of 0`?

Thanks.

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [February 3, 2022, 9:39am UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/9 "2022-02-03T09:39:23Z")

</div>

@timothyarmes,

Also, if that’s something doable on your side, I will be interested in seeing the result of the call on your user:  
In the browser console, in the tab Network, the result of call to `https://app.forestadmin.com/api/users?id=[your-user-id]&include=role&projectId=[project-id]`, and especially the permissions associated to the current environment and the promocodes collection.

Something like this:

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

---

<div class="post-metadata">

**Author:** ![timothyarmes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/timothyarmes/32/3450_2.png) [@timothyarmes](https://community.forestadmin.com/u/timothyarmes)\
**Post date:** [February 3, 2022, 10:13am UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/10 "2022-02-03T10:13:12Z")

</div>

Hi,

It does see the correct number of records and shows page 1/1.

Here’s the console error when trying to view a record:

```javascript
chunk.8.bd8e8ba….js:1 GET https://fa.brxsapp.com/forest/promocodes/7b9fc372-5b71-4b2a-bc67-26f1bc4b1c3d?timezone=Europe%2FParis 403

11:09:53.953

chunk.8.bd8e8ba….js:1 [forest] 🌳🌳🌳 Unexpected error in details view:

1. n {isAdapterError: true, stack: 'Error: Ember Data Request GET https://fa.brxsapp.c…m/assets/chunk.8.bd8e8ba96866ab6bafcd.js:1:47562)', description: undefined, fileName: undefined, lineNumber: undefined, …}

  1. description: undefined
  2. errors: Array(1)

    1. 0:

      1. detail: "Forbidden"
      2. name: "ForbiddenError"
      3. status: 403
      4. [[Prototype]]: Object

    2. length: 1
    3. []: (...)
    4. firstObject: (...)
    5. hasArrayObservers: (...)
    6. lastObject: (...)
    7. [[Prototype]]: Array(0)

  3. fileName: undefined
  4. isAdapterError: true
  5. lineNumber: undefined
  6. message: "Ember Data Request GET https://fa.brxsapp.com/forest/promocodes/7b9fc372-5b71-4b2a-bc67-26f1bc4b1c3d returned a 403\nPayload (application/json; charset=utf-8)\n[object Object]"
  7. name: "Error"
  8. number: undefined
  9. stack: "Error: Ember Data Request GET https://fa.brxsapp.com/forest/promocodes/7b9fc372-5b71-4b2a-bc67-26f1bc4b1c3d returned a 403\nPayload (application/json; charset=utf-8)\n[object Object]\n at n.i (https://app.forestadmin.com/assets/vendor-5ed7990a316446b58c5ac6ae987f51ea.js:158:229581)\n at new n (https://app.forestadmin.com/assets/vendor-5ed7990a316446b58c5ac6ae987f51ea.js:158:230339)\n at b.handleResponse (https://app.forestadmin.com/assets/vendor-5ed7990a316446b58c5ac6ae987f51ea.js:158:236678)\n at b.handleResponse (https://app.forestadmin.com/assets/client-8de26bba69d386698806f1b376c72e0f.js:1:3928609)\n at x (https://app.forestadmin.com/assets/vendor-5ed7990a316446b58c5ac6ae987f51ea.js:158:241065)\n at https://app.forestadmin.com/assets/vendor-5ed7990a316446b58c5ac6ae987f51ea.js:158:237743\n at b.s.Promise.u.error (https://app.forestadmin.com/assets/vendor-5ed7990a316446b58c5ac6ae987f51ea.js:158:237754)\n at l (https://app.forestadmin.com/assets/vendor-5ed7990a316446b58c5ac6ae987f51ea.js:48:24786)\n at Object.fireWith [as rejectWith] (https://app.forestadmin.com/assets/vendor-5ed7990a316446b58c5ac6ae987f51ea.js:48:25534)\n at k (https://app.forestadmin.com/assets/vendor-5ed7990a316446b58c5ac6ae987f51ea.js:48:76509)\n at XMLHttpRequest.<anonymous> (https://app.forestadmin.com/assets/vendor-5ed7990a316446b58c5ac6ae987f51ea.js:48:78952)\n at XMLHttpRequest.r (https://app.forestadmin.com/assets/chunk.8.bd8e8ba96866ab6bafcd.js:1:47562)"
  10. [[Prototype]]: Error

    1. code: "ForbiddenError"

```

---

<div class="post-metadata">

**Author:** ![timothyarmes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/timothyarmes/32/3450_2.png) [@timothyarmes](https://community.forestadmin.com/u/timothyarmes)\
**Post date:** [February 3, 2022, 10:16am UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/11 "2022-02-03T10:16:16Z")

</div>

Here’s the requested result of the GET:

`{"included":[{"type":"roles","id":"3467","attributes":{"name":"Marketing","created_at":"2022-01-10T14:19:02.313Z","permissions":{"environments":[{"enabled":true,"collections":[{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[{"triggerEnabled":false,"smartActionName":"Upload Property Photo(s)","approvalRequired":false,"selfApprovalEnabled":false,"userApprovalEnabled":false}],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"properties"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"transactions"},{"addEnabled":true,"editEnabled":true,"readEnabled":true,"smartActions":[],"browseEnabled":true,"deleteEnabled":true,"exportEnabled":true,"collectionName":"promocodes"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[{"triggerEnabled":false,"smartActionName":"Import pre-signup users","approvalRequired":false,"selfApprovalEnabled":false,"userApprovalEnabled":false}],"browseEnabled":true,"deleteEnabled":false,"exportEnabled":false,"collectionName":"preSignupUsers"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"users"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":true,"deleteEnabled":false,"exportEnabled":false,"collectionName":"credits"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"property_stats"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"propertyNeighbourhoods"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"neighbourhoods"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"neighbourhoodPriceHistory"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"photos"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"migrations"}],"environmentId":84105},{"enabled":false,"collections":[{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[{"triggerEnabled":false,"smartActionName":"Delete User","approvalRequired":false,"selfApprovalEnabled":false,"userApprovalEnabled":false}],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"users"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[{"triggerEnabled":false,"smartActionName":"Upload Property Photo(s)","approvalRequired":false,"selfApprovalEnabled":false,"userApprovalEnabled":false}],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"properties"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"transactions"},{"addEnabled":true,"editEnabled":true,"readEnabled":true,"smartActions":[],"browseEnabled":true,"deleteEnabled":true,"exportEnabled":true,"collectionName":"promocodes"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[{"triggerEnabled":false,"smartActionName":"Import pre-signup users","approvalRequired":false,"selfApprovalEnabled":false,"userApprovalEnabled":false}],"browseEnabled":true,"deleteEnabled":false,"exportEnabled":false,"collectionName":"preSignupUsers"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":true,"deleteEnabled":false,"exportEnabled":false,"collectionName":"credits"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"property_stats"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"propertyNeighbourhoods"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"neighbourhoods"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"neighbourhoodPriceHistory"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"photos"},{"addEnabled":false,"editEnabled":false,"readEnabled":false,"smartActions":[],"browseEnabled":false,"deleteEnabled":false,"exportEnabled":false,"collectionName":"migrations"}],"environmentId":84113}]}}}],"data":{"type":"users","id":"64508","attributes":{"first_name":"Testy","last_name":"Tim","username":"testytim","email":"<snip>@gmail.com","permission_level":"editor","permissions":["createApproval","listApprovals","countApprovals","exportApprovals","createActivityLog","listActivityLog","getBilling","listColumnForCollection","listColumnForSegment","listCollectionCustomActions","getCustomAction","listEnvironments","getEnvironment","getGuest","updateGuest","getLayout","updateLayout","listMessage","createMessage","updateMessage","removeMessage","listUserNotes","listUsersMentions","listCollectionNotes","createNote","updateNote","removeNote","resetPassword","listProjects","getProject","createProject","getProjectDevelopmentEnvironments","listEnvironmentRenderings","listTeamRenderings","getRendering","listRole","getTeamFromUser","listProjectUsers","listMentionables","listTeamUsers","listViews","getView","uploadView","listWidgets","getLayoutChangesCount","checkProjectExistence","getQuickTour","updateQuickTour","checkReviewExistance"],"created_at":"2022-01-31T14:51:46.999Z","tags":[],"two_factor_authentication_active":false,"has_password":true,"is_sso_account_only":false,"is_blocked":false},"relationships":{"role":{"data":{"type":"roles","id":"3467"}},"projects":{"data":[{"type":"projects","id":"74899"}]},"teams":{"links":{"related":"/api/users/64508/teams"}}}}}`

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [February 3, 2022, 11:05am UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/12 "2022-02-03T11:05:52Z")

</div>

Thanks @timothyarmes! 🙏

Ok, so the browser is receiving the correct permissions.  
However, it seems like your forest agent is returning a 403 when being ask the record details 🤔

Can you see any error log on your forest agent when trying to access this record?  
Did you override this GET route of one promocode?  
Can you check that you have the `permissionMiddleware.details()` as a middleware of the route?  
If you didn’t touch it, it should look like something like this:

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

---

<div class="post-metadata">

**Author:** ![timothyarmes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/timothyarmes/32/3450_2.png) [@timothyarmes](https://community.forestadmin.com/u/timothyarmes)\
**Post date:** [February 3, 2022, 12:19pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/13 "2022-02-03T12:19:05Z")

</div>

Hi,

It’s suddenly started working. Did you change something?

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [February 3, 2022, 1:01pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/14 "2022-02-03T13:01:52Z")

</div>

Hi @timothyarmes,

No we didn’t change anything 🤔 That’s strange.

Did you, on your agent? Or maybe just restarted it?

---

<div class="post-metadata">

**Author:** ![timothyarmes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/timothyarmes/32/3450_2.png) [@timothyarmes](https://community.forestadmin.com/u/timothyarmes)\
**Post date:** [February 3, 2022, 1:21pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/15 "2022-02-03T13:21:02Z")

</div>

So, looking at the logs I saw a Forbidden access to a completely different collection. As a test, I allowed access to that collection and tried again, and I could then access the promocodes collection as expected.

I then removed the access to the irrelevant collection, but I found that I _still_ had access to the promo code collection! Hence I though that maybe you had changed something else.

I’m waiting to see if the other users now have access…

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [February 3, 2022, 1:40pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/16 "2022-02-03T13:40:36Z")

</div>

@timothyarmes ok strange 🤔

Let me know if everything is working as expected now.

---

<div class="post-metadata">

**Author:** ![timothyarmes](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/timothyarmes/32/3450_2.png) [@timothyarmes](https://community.forestadmin.com/u/timothyarmes)\
**Post date:** [February 3, 2022, 2:27pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/17 "2022-02-03T14:27:54Z")

</div>

Hi,

Well, the other accounts with this role still can’t access the details page! This is all really strange.

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [February 3, 2022, 2:53pm UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/18 "2022-02-03T14:53:40Z")

</div>

Ok, so with the other accounts you can see some 403 logs in your agent?  
Do they contain any details?

---

<div class="post-metadata">

**Author:** ![anon34731316](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@anon34731316](https://community.forestadmin.com/u/anon34731316)\
**Post date:** [February 14, 2022, 8:27am UTC](https://community.forestadmin.com/t/role-cant-access-record-read-detail-configured/4136/19 "2022-02-14T08:27:45Z")

</div>

Hello @timothyarmes,

Any news of this topic? 🙄

Thanks!
