APP_Payments_Admin_Security
Class to secure Orders in back-end from user access.
Package
Description Description
Security might be setted up in two levels:
- All users with ‘edit_posts’ capability can view own Orders list page and appropriate menu items, but only users with ‘edit_others_posts’ capability can edit orders in back-end.
- Only users with ‘edit_others_posts’ cap can view and edit orders in back-end.
Methods Methods
- __construct — Setup admin security.
- _fix_count_orders — Fixes orders counts by status.
- _orders_query_set_only_author — Filters out query to retrieve orders created by current user unless user has appropriate permissions.
- _protect_edit_order_form — Redirects user from Edit Order form to single Order page unless user has appropriate permissions.
- _protect_new_order_form — Disables 'post new order' page.
- _protect_orders_index_page — Protects orders index page from user access, unless user has appropriate permissions.
- map_meta_cap — Filter a user's capabilities depending on specific context and/or privilege.