PluginProbe
Metricool – Social media and site statistics / 2.1.1
Metricool – Social media and site statistics v2.1.1
2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
← All changes | app/Features/Onboarding/OnboardingLoader.php +5 -2 2.0.2 → 2.1.1 View file →
@@ -7,11 +7,14 @@
7 7 use Metricool\Features\AbstractLoader;
8 8 use Metricool\Services\DashboardService;
9 9 use Metricool\Support\Helpers\Storages\EnvironmentConfig;
10 10 use Metricool\Support\Helpers\Storages\RequestStorage;
11 +use Metricool\Traits\HasAllowlistControl;
11 12
12 13 class OnboardingLoader extends AbstractLoader
13 14 {
15 + use HasAllowlistControl;
16 +
14 17 private DashboardService $dashboard;
15 18
16 19 public function __construct(EnvironmentConfig $env, RequestStorage $request, DashboardService $dashboard)
17 20 {
@@ -24,9 +27,9 @@
24 27 * @inheritDoc
25 28 */
26 29 public function isEnabled(): bool
27 30 {
28 - return $this->dashboard->isOnboardingCompleted() === false && current_user_can('metricool_manage');
31 + return $this->dashboard->isOnboardingCompleted() === false;
29 32 }
30 33
31 34 /**
32 35 * @inheritDoc
@@ -32,7 +35,7 @@
32 35 * @inheritDoc
33 36 */
34 37 public function inScope(): bool
35 38 {
36 - return true;
39 + return $this->userCanManage();
37 40 }
38 41 }