Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Add ACL Access Logic Hooks #9846

Merged

Conversation

mattlorimer
Copy link
Member

Description

This PR add 2 new Logic Hooks:-

  • before_acl_query
  • before_acl_check

That allow you to extend and override access rights. To achieve this there was slight extension to the logic hook logic to allow it too return a value which was require in both cases, along side the general use of access logic being simplified through the CRM so it consistent and easily extendable via the new hooks.

The change should fully backward compatible and documentation to follow

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

Centralise duplicate logic into Sugarbean and update usages to use new function `buildAccessWhere` instead of all doing get owner and group call independently making it hard to extend
`before_acl_check` override and extend acl access checks
`before_acl_query` override and extend acl access query where conditions
@jack7anderson7 jack7anderson7 merged commit 6f297c7 into salesagility:develop Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants