Document same-role permissions for group-based access control#502
Document same-role permissions for group-based access control#502promptless-for-oss wants to merge 1 commit into
Conversation
|
|
||
| Same-role permissions | ||
| ********************* | ||
|
|
There was a problem hiding this comment.
PR #15465 introduces the same-role permissions feature. The new bit values (2048, 4096, 8192, 16384) are from AbstractPermissions::addExtendedPermissions() at lines 474-793 of the diff.
Source: mautic/mautic#15465
| .. code-block:: php | ||
|
|
||
| <?php | ||
|
|
There was a problem hiding this comment.
The hasEntityAccess() method signature and auto-inference of same-role permissions is from CorePermissions at lines 870-1012 of the PR diff, specifically the toSameRolePermission() private method.
Source: mautic/mautic#15465
|
|
||
| Controllers extending ``CommonController`` have access to helper methods that handle role-based filtering of entity lists: | ||
|
|
||
| .. code-block:: php |
There was a problem hiding this comment.
Controller helper methods getStandardPermissions(), hasStandardViewPermission(), and addStandardRoleBasedFilter() are from CommonController at lines 490-547 of the PR diff.
Source: mautic/mautic#15465
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions
|
Thanks for the detailed review, @adiati98! I've applied all 24 suggestions:
Ready for another look when you have a chance. |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions
|
Done, @adiati98! Applied both fixes:
Ready for another look. |
|
Hi @adiati98, I believe this was already addressed in my previous commit — the table now shows "Publish/Unpublish" with a capital U. Could you refresh the PR view and let me know if you're still seeing an issue? |
What I asked was: |
|
Thanks for clarifying, @adiati98! I've updated that line to use active voice:
Ready for another look. |
|
@promptless-for-oss please rebase to 7.2 branch. |
Rebased to 7.2 branch per reviewer request. Add documentation for the new same-role permission feature that provides a middle ground between own and other permissions. Users with viewsamerole, editsamerole, deletesamerole, or publishsamerole can access content created by other users who share the same Role assignment. Updated: - addExtendedPermissions() method descriptions to include samerole permissions - addExtendedFormFields() method descriptions Added new sections covering: - Available same-role permissions with their bit values - Permission hierarchy (own < samerole < other) - hasEntityAccess() method support for same-role checks - Controller helpers for role-based filtering
7bc2cfc to
c378c3a
Compare
|
Done! I've rebased the branch to 7.2 as requested. The documentation changes are now based on the 7.2 branch. |
|
@promptless-for-oss please close and reopen this PR to trigger the GitHub actions that are stuck. |
|
Done! I've closed and reopened this PR to trigger the GitHub Actions. They should be running now. |
Open this suggestion in Promptless to view citations and reasoning process
Documents the new same-role permission feature (viewsamerole, editsamerole, deletesamerole, publishsamerole) that allows users to access content created by other users who share the same Role. Updates addExtendedPermissions() and addExtendedFormFields() method descriptions, and adds comprehensive documentation covering permission hierarchy, hasEntityAccess() support, and controller helpers.
Trigger Events
Tip: Worried about broken links? Ask Promptless to find and fix them automatically 🔗