[COMPONENT][Group] More flexible member roles than only isAdmin

Refactor terminology of canAdmin to match current roles system
This commit is contained in:
2022-02-14 04:35:13 +00:00
parent bc63c3727a
commit 3f9c86f0df
7 changed files with 20 additions and 15 deletions

View File

@@ -76,7 +76,7 @@ class Group extends Component
{
$actor = Common::actor();
$group = $vars['actor'];
if (!\is_null($actor) && $group->isGroup() && $actor->canAdmin($group)) {
if (!\is_null($actor) && $group->isGroup() && $actor->canModerate($group)) {
$url = Router::url('group_settings', ['id' => $group->getId()]);
$res[] = HTML::html(['a' => ['attrs' => ['href' => $url, 'title' => _m('Edit group settings'), 'class' => 'profile-extra-actions'], _m('Group settings')]]);
}