mirror of
https://github.com/friendica/friendica
synced 2025-04-25 01:10:12 +00:00
Merge pull request #13336 from annando/moderator
Preparations for a moderator role
This commit is contained in:
commit
1d556b78c1
6 changed files with 245 additions and 208 deletions
|
@ -82,12 +82,12 @@ abstract class BaseModeration extends BaseModule
|
|||
}
|
||||
}
|
||||
|
||||
if (!$this->app->isSiteAdmin()) {
|
||||
throw new HTTPException\ForbiddenException($this->t('You don\'t have access to administration pages.'));
|
||||
if (!$this->session->isModerator()) {
|
||||
throw new HTTPException\ForbiddenException($this->t('You don\'t have access to moderation pages.'));
|
||||
}
|
||||
|
||||
if ($this->session->getSubManagedUserId()) {
|
||||
throw new HTTPException\ForbiddenException($this->t('Submanaged account can\'t access the administration pages. Please log back in as the main account.'));
|
||||
throw new HTTPException\ForbiddenException($this->t('Submanaged account can\'t access the moderation pages. Please log back in as the main account.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ class Ping extends BaseModule
|
|||
$myurl = $this->session->getMyUrl();
|
||||
$mail_count = $this->database->count('mail', ["`uid` = ? AND NOT `seen` AND `from-url` != ?", $this->session->getLocalUserId(), $myurl]);
|
||||
|
||||
if (intval($this->config->get('config', 'register_policy')) === Register::APPROVE && $this->app->isSiteAdmin()) {
|
||||
if (intval($this->config->get('config', 'register_policy')) === Register::APPROVE && $this->session->isSiteAdmin()) {
|
||||
$registrations = \Friendica\Model\Register::getPending();
|
||||
$register_count = count($registrations);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue