FIX: review-insights have a 404 dialog for category moderators

When adding a user as the category moderator(not moderator or admin), the user wasn’t grant the staff permission.

And when they moderate reviews(/review), the insights page will bump An error occurred: Page Not Found。

The issue is caused by the loadIpData() function, when it tries to get /admin/users/xxxx.json, the permission is denied by the backend.

This commit add a logic !this.currentUser.staff, to exclude users without staff permissions from requesting this api in frontend, so that there won’t be a dialog here.

1 Like

Thank you for this fix :confetti_ball:

I tested it manually, but I will also add some automated tests.

1 Like