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

Switching the new content admin menu item to respect the same capability as Members List #2968

Merged
merged 2 commits into from
May 8, 2024

Conversation

kimcoleman
Copy link
Member

All Submissions:

Changes proposed in this Pull Request:

Adjusted the capability for the admin + New > Member menu item to respect the same capability we use to check for this on the Members List: edit_users.

Copy link
Member

@dparker1005 dparker1005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be using the pmpro_get_edit_member_capability() function here? It looks like this is used elsewhere in the code for the Edit User page.

@kimcoleman
Copy link
Member Author

@dparker1005 I don't think so - we use edit_users here, since adding a member also requires this:

https://github.com/strangerstudios/paid-memberships-pro/blob/dev/adminpages/memberslist.php#L24-L26

But looking at this, perhaps we should change this cap (can be a separate PR just noticed). https://github.com/strangerstudios/paid-memberships-pro/blob/dev/adminpages/memberslist.php#L24-L26. That one could be pmpro_get_edit_member_capability().

@dparker1005 dparker1005 merged commit c573ea1 into strangerstudios:dev May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants