marklogic-community / data-explorer

Data Explorer Tool
Other
15 stars 4 forks source link

wizard-user cannot manage queries and views #132

Closed cskeefer closed 6 years ago

cskeefer commented 6 years ago

This pull request is for issue #131. When logging in as wizard-user and clicking 'Edit config' in the nav bar, the user was being logged out and taken back to the login page. This was due to api-crud-list-queries.xqy checking to see if the user had the role 'data-explorer-search-role'. Since wizard-user does not have this role, they got bounced to the login page.

I believe this was just a typo and api-crud-list-queries.xqy should have been checking to see if the user has the 'data-explorer-wizard-role' instead since search users don't have access to the 'Edit config' menu. In researching the issue, I found that api-crud-list-views.xqy (retrieves views for a query) and api-crud-get-query-view.xqy (loads a query to edit it) had the same issue.

To see the issue:

To confirm the fix