Preparations for a moderator role
This commit is contained in:
@@ -93,6 +93,13 @@ interface IHandleUserSessions extends IHandleSessions
|
||||
*/
|
||||
public function isSiteAdmin(): bool;
|
||||
|
||||
/**
|
||||
* Check if current user is a moderator.
|
||||
*
|
||||
* @return bool true if user is a moderator
|
||||
*/
|
||||
public function isModerator(): bool;
|
||||
|
||||
/**
|
||||
* Returns User ID of the managed user in case it's a different identity
|
||||
*
|
||||
|
||||
@@ -139,6 +139,12 @@ class UserSession implements IHandleUserSessions
|
||||
return User::isSiteAdmin($this->getLocalUserId());
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public function isModerator(): bool
|
||||
{
|
||||
return User::isModerator($this->getLocalUserId());
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public function setVisitorsContacts(string $my_url)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user