| @@ -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' ), |