mirror of
https://github.com/friendica/friendica
synced 2025-05-02 07:04:23 +02:00
Preparations for a moderator role
This commit is contained in:
parent
41bc148040
commit
0a45bdd3b7
5 changed files with 31 additions and 4 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue