LLMS_REST_Students_Progress_Controller::update_item_permissions_check( WP_REST_Request $request )
Determine if current user has permission to create/update an enrollment.
Parameters Parameters
- $request
-
(WP_REST_Request) (Required) Request object.
Return Return
(true|WP_Error)
Source Source
File: libraries/lifterlms-rest/includes/server/class-llms-rest-students-progress-controller.php
* @since 1.0.0-beta.1 * * @param WP_REST_Request $request Request object. * @return true|WP_Error */ public function update_item_permissions_check( $request ) { if ( ! current_user_can( 'edit_post', $request['post_id'] ) || ! current_user_can( 'edit_students', $request['id'] ) ) { return llms_rest_authorization_required_error();
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |