PluginProbe
ActivityPub / 8.0.2
ActivityPub v8.0.2
9.3.1 9.3.0 9.2.2 9.2.1 9.2.0 9.1.0 9.0.2 9.0.1 9.0.0 8.3.0 8.2.1 8.2.0 8.1.1 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.2.0 1.3.0 2.0.0 2.0.1 2.1.0 2.1.1 All 160 releases
← All changes | includes/rest/admin/class-actions-controller.php +0 -7 9.2.08.0.2 View file →
@@ -12,9 +12,8 @@
12 12 use Activitypub\Collection\Followers;
13 13 use Activitypub\Collection\Following;
14 14 use Activitypub\Collection\Remote_Actors;
15 15 use Activitypub\Moderation;
16 -use Activitypub\OAuth\Server as OAuth_Server;
17 16
18 17 use function Activitypub\user_can_activitypub;
19 18
20 19 /**
@@ -118,14 +117,8 @@
118 117 *
119 118 * @return bool|\WP_Error True if the request has permission, WP_Error object otherwise.
120 119 */
121 120 public function check_permission() {
122 - // This is an admin endpoint; scoped OAuth C2S tokens must not drive it.
123 - $denied = OAuth_Server::deny_if_oauth();
124 - if ( null !== $denied ) {
125 - return $denied;
126 - }
127 -
128 121 if ( ! user_can_activitypub( \get_current_user_id() ) ) {
129 122 return new \WP_Error(
130 123 'rest_forbidden',
131 124 \__( 'Sorry, you are not allowed to perform this action.', 'activitypub' ),