Show main content even without permission for media attachments
rmaiwald opened this issue · comments
When MediaAttach 1.1.0.0 is hooked to another module (e.g. News) and a user has permission to view the module contents but has no persionn to view attached files too, the whole page will not be displayed. Instead the request is redirected to the login screen.
The function MediaAttach_user_showfilelist in pnuser/showfilelist.php (MediaAttach 1.1.0.0) always returns with LogUtil::registerPermissionError(), when checkPermission() fails. Other hook modules return empty content, if called as a hook.
MediaAttach should do so too, i.e. check if the GUI function was called as a hook ($objectid != '') and then return empty content (return false) rather than call LogUtil::registerPermissionError().
Regards
Reiner