Access error should return a page template and not a json
When a user who is not in GeneralManager group, he has a json page and not a web page from Nextcloud.
To test that :
- First, you connect to our dev platform ;
- Second, in the users settings, remove me to
GeneralManagergroup ; - Third, use impersonate to impersonate me ;
- Then, click on the Workspace button and look at the result ;
I think the Middleware should return a page template.
Doc : https://docs.nextcloud.com/server/21/developer_manual/basics/middlewares.html.
Originally posted by @zak39 in https://github.com/arawa/workspace/pull/22#discussion_r625208137
@zak39 I've created an issue for that.
I don't think it's a very urgent issue as this error shouldn't happen: the frontent should not ask the backend to perform operations that the user is not allowed to do. So, the only cases where this error would show up are either a bug in the frontend or a call originating from somewhere else than the frontend.
Thanks @StCyr :)
We must find a solution to hide the workspace button in the header and show authorized users only.
But we should create an error page 403 Forbidden (https://developer.mozilla.org/fr/docs/Web/HTTP/Status/403) which forbidden users access to resource.
I agree that this issue is not urgent.
We must find a solution to hide the workspace button in the header and show authorized users only.
We can use the 'limit to groups" app functionnality:
