server-ux
server-ux copied to clipboard
[15.0][FIX]date_range: Fixed portal access denied
The module "date_range" is not usable for portal users. This fix adds the needed permissions to access the date_range for portal users. The added permissions are the same as a regular user.
Base Odoo module "portal" is required to login to the portal. Another module which uses the date_range module is needed. For example the base Odoo module "project".
Current behavior: The portal user accesses a project he got shared editable. When he tries to open the filter menu he gets an access denied error.
Steps to reproduce:
- Login as portal user
- open a project that got shared "editable" (the portal user can edit/ write on that project)
- Click on button "filter"
- The access denied error appears
Hi @lmignon, some modules you are maintaining are being modified, check this out!
I don't get why the portal requires this permission. I have just tried on runboat before this PR (http://oca-server-ux-15-0-e81102ffd3d5.runboat.odoo-community.org/my/tasks?) using portal/portal, and no problem found. This can be something on your side.
The portal user only needs the access rights to date_range when the portal user has write rights on the project. See http://oca-server-ux-15-0-e81102ffd3d5.runboat.odoo-community.org/my/project/1?
Is it possible that date range is not active for the read-only view?
Tested and no problem on my side:
If you don't put exact steps to reproduce the problem, it's hard to reproduce it. It's true that the full project sharing is a special case of "backend" view in portal.
Sorry if I described the steps to little. I thought it was clear enough. updated the pull request description.
Steps to reproduce:
- Login as portal user
- open a project that got shared "editable" (the portal user can edit/ write on that project)
- Click on button "filter"
- The access denied error appears
It was clear for you, but not for the rest. Thanks for telling and editing the main comment including them.
Indeed that case is not covered. As said, this only happens because the project sharing is adding a backend view in portal. Not sure if adding such read permission is "too much". The only other path I see is to not show ranges on that special case (can it be detected?).
I let the usual collaborators of this module to give their opinion.
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.
Any news?