Plugins now support elevated privileges
This commit is contained in:
parent
f8ae611ec9
commit
3cff8caa15
|
|
@ -15,6 +15,11 @@ abstract class PluginBase extends ServiceProviderBase
|
|||
*/
|
||||
public $require = [];
|
||||
|
||||
/**
|
||||
* @var boolean Determine if this plugin should have elevated privileges.
|
||||
*/
|
||||
public $elevated = false;
|
||||
|
||||
/**
|
||||
* @var boolean Determine if this plugin should be loaded (false) or not (true).
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ class PluginManager
|
|||
return;
|
||||
}
|
||||
|
||||
if (!self::$noInit) {
|
||||
if (!self::$noInit || $plugin->elevated) {
|
||||
$plugin->register();
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ class PluginManager
|
|||
return;
|
||||
}
|
||||
|
||||
if (!self::$noInit) {
|
||||
if (!self::$noInit || $plugin->elevated) {
|
||||
$plugin->boot();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue