Reputation: 195
I have a set of API endpoints which is redirected to the respective Xquery modules using a custom rewriter(that uses rest:rewrite) and custom error handler (that uses $error:errors). The HTTP calls are of GET and POST methods.
When I try to access the API with a non-admin user(app specific user without admin role), I'm getting 404 not found error.
But when I assign the admin role to this user, I'm able to get the results.
As per my understanding, we should not assign the admin roles to app specific user in ML.
I need to know whether I'm missing any execute privileges or roles to be assigned for this user. Or what could be done to resolve this issue?
Upvotes: 0
Views: 134
Reputation: 20414
I suspect you have uploaded your modules with document permissions causing the user you are using to not be able to execute the required code, which likely includes rewriter and error handler as well.
Check which modules database is behind the app-server that you are using, and use QConsole to check permissions of the modules you loaded. Compare the roles mentioned there with those of the user that you are using. Solution is then to either apply different permissions to your modules, or add extra role to your user.
HTH!
Upvotes: 1