mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-27 00:36:44 +03:00
Fix plugin admin permission
This commit is contained in:
parent
db629bf29c
commit
e9ad4e38c2
2 changed files with 6 additions and 2 deletions
|
|
@ -24,7 +24,9 @@ class BackupPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
|
||||
public function JsonAdminGetData()
|
||||
{
|
||||
if (!($this->Manager()->Actions() instanceof \RainLoop\ActionsAdmin)) {
|
||||
if (!($this->Manager()->Actions() instanceof \RainLoop\ActionsAdmin)
|
||||
|| !$this->Manager()->Actions()->IsAdminLoggined()
|
||||
) {
|
||||
return $this->jsonResponse(__FUNCTION__, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,9 @@ class ExamplePlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
|
||||
public function JsonAdminGetData()
|
||||
{
|
||||
if ($this->Manager()->Actions() instanceof \RainLoop\ActionsAdmin) {
|
||||
if (!($this->Manager()->Actions() instanceof \RainLoop\ActionsAdmin)
|
||||
|| !$this->Manager()->Actions()->IsAdminLoggined()
|
||||
) {
|
||||
return $this->jsonResponse(__FUNCTION__, false);
|
||||
}
|
||||
return $this->jsonResponse(__FUNCTION__, array(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue