fix install check context

This commit is contained in:
Jean-Christian Denis 2023-07-16 23:46:09 +02:00
parent 750c7c15f9
commit bd38db17e8
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951
3 changed files with 5 additions and 5 deletions

View file

@ -18,7 +18,7 @@ $this->registerModule(
'improve',
'Tiny tools to fix things for module devs',
'Jean-Christian Denis and contributors',
'1.3.1',
'1.3.2',
[
'requires' => [
['php', '8.1'],

View file

@ -2,10 +2,10 @@
<modules xmlns:da="http://dotaddict.org/da/">
<module id="improve">
<name>improve</name>
<version>1.3.1</version>
<version>1.3.2</version>
<author>Jean-Christian Denis and contributors</author>
<desc>Tiny tools to fix things for module devs</desc>
<file>https://github.com/JcDenis/improve/releases/download/v1.3.1/plugin-improve.zip</file>
<file>https://github.com/JcDenis/improve/releases/download/v1.3.2/plugin-improve.zip</file>
<da:dcmin>2.27</da:dcmin>
<da:details>https://github.com/JcDenis/improve</da:details>
<da:support>https://github.com/JcDenis/improve</da:support>

View file

@ -21,7 +21,7 @@ class My extends MyPlugin
{
protected static function checkCustomContext(int $context): ?bool
{
return defined('DC_CONTEXT_ADMIN')
&& dcCore::app()->auth->isSuperAdmin();
return $context === My::INSTALL ? null :
defined('DC_CONTEXT_ADMIN') && dcCore::app()->auth->isSuperAdmin();
}
}