[ADD] project_no_portal: new module to block portal access on projects#1741
Open
divad1196 wants to merge 1 commit into
Open
[ADD] project_no_portal: new module to block portal access on projects#1741divad1196 wants to merge 1 commit into
divad1196 wants to merge 1 commit into
Conversation
672770b to
088581f
Compare
This module add per-company switch block_project_portal_access under Settings > Project. Active by default. For a blocking company: - A constraint forbids privacy_visibility = 'portal' (default becomes employees). - A post_init_hook migrates existing portal projects. This alone removes portal read access. - A mixin on project.project/project.task also denies portal users in _search/_check_access. This adds an additional security without deleting existing ir.model.access - The "Share Project" / "Share Task" actions are unbound. Calling them, for example from the code, raises an error. An uninstall_hook restores them. Scoped per company (multi-company friendly) and fully reversible.
c480e0d to
f4bf8c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
A project with
privacy_visibility = 'portal'("Invited portal users") lets any portal follower of the project or its tasks read it, and managers can share project/task data via the "Share Project" wizard and the "Share Task" public link.What it does
A per-company switch
block_project_portal_access(res.company, on by default, under Settings > Project).For a blocking company:
privacy_visibility = 'portal'(default becomesemployees).A
post_init_hookmigrates existing portal projects. This alone removes portal read access.project.project/project.taskalso denies portal users in_search/_check_access.This adds an additional security without deleting existing
ir.model.accessCalling them, for example from the code, raises an error.
An
uninstall_hookrestores them.Scoped per company (multi-company friendly) and fully reversible.