omeka-s-modules / Datavis

GNU General Public License v3.0
2 stars 1 forks source link

Data Visualization appears in site menu for lower user roles #13

Closed allanaaa closed 1 year ago

allanaaa commented 2 years ago

DataVis (1.0.1) shows up under sites in the left-hand navigation for user roles that can't use it. Link appears for Researchers, Authors, Reviewers, and Editors, then results in the error message when clicked. Works fine for supervisors.

It doesn't depend on whether a user is added to a site (i.e. my Author set to Manager still gets an error). Should this be dependent on site-user-role? Like, Creators and Managers could access it on their respective sites?

Error message:

Omeka\Mvc\Exception\PermissionDeniedException Permission denied for the current user to access the index action of the Datavis\Controller\SiteAdmin\Index controller.

Details:

Omeka\Mvc\Exception\PermissionDeniedException: Permission denied for the current user to access the index action of the Datavis\Controller\SiteAdmin\Index controller. in /var/www/html/amayer/amayer-s/omeka-s/application/src/Mvc/MvcListeners.php:459 Stack trace:

0 /var/www/html/amayer/amayer-s/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Omeka\Mvc\MvcListeners->authorizeUserAgainstController(Object(Laminas\Mvc\MvcEvent))

1 /var/www/html/amayer/amayer-s/omeka-s/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))

2 /var/www/html/amayer/amayer-s/omeka-s/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))

3 /var/www/html/amayer/amayer-s/omeka-s/index.php(21): Laminas\Mvc\Application->run()

4 {main}