Open sc0ttkclark opened 6 months ago
Much needed.
In my case, I've created a custom settings page with some image fields that serve globally throughout the site and the site manager can't access it due to not having the "manage_options" capability enabled, only an admin user has access to it, and it breaks the purpose for the settings page I've created, and I see no other mean other than creating individual custom fields for every page in which those image fields are needed to be shown.
I've tried giving the "manage_options" capability to the site manager role, but in addition to it not being safe, it didn't work also, the custom settings page only shows up in the menu for admin roles.
Problem to Solve
Right now, you must have access as a Pods admin (caps:
pods
,pods_content
, orpods_edit_{pod_name}
).It would be great to override what capability check(s) are used for the Custom Settings Pages specifically.
Proposed Solution
Add a new option to the Pod edit screen for Settings pods so that you can choose from these capabilities:
Possible Workaround
Todos
PodsAdmin::admin_menu()
https://github.com/pods-framework/pods/blob/08d1c6aacd3328186ff3de81cb6b560ddd3dd487/classes/PodsAdmin.php#L477\Pods\Admin\Config\Pod::get_fields()
for Settings pods:capability_type
andcapability_type_custom