The rest_routes:
pagantis/v1/logs/(?P\w+)/(?P\d+)/(?P\d+)
pagantis/v1/configController/(?P\w+)
pagantis/v1/api/(?P\w+)/(?P\w+)/(?P\w+)
must have a permision_callback parameter. If this routes are public the value for the parameter can be "__return_true", if not only having a
if ( ! is_user_logged_in() ) {
return new WP_Error( 'rest_not_logged_in', 'You are not currently logged in.', array( 'status' => 401 ) );
}
must be enough.
Also I can do a Pull Request with this code.
Thanks a lot!
The rest_routes:
pagantis/v1/logs/(?P\w+)/(?P\d+)/(?P\d+)
pagantis/v1/configController/(?P\w+)
pagantis/v1/api/(?P\w+)/(?P\w+)/(?P\w+)
must have a permision_callback parameter. If this routes are public the value for the parameter can be "__return_true", if not only having a
must be enough.
Also I can do a Pull Request with this code.
Thanks a lot!