Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Change references to the group "manager" persona to "administrator" #765

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ provide a quick way to get started with Organic groups.
(admin/structure/types/manage/group/display)
and choose the Group subscription format for the Group type field.
4. Back in the group view you will now notice a 'Subscribe' link (If you are
the group administrator it will say "You are the group manager").
the group administrator it will say "You are the group administrator").
10. In order to associate other entities with group or group content, navigate
to Organic Groups field settings", in admin/config/group/fields.
11. In order to define default permissions for groups that are newly created or
Expand Down
2 changes: 1 addition & 1 deletion config/schema/og.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ og.settings:
type: og.settings.group.[%key]
group_manager_full_access:
type: boolean
label: 'Full access for group managers'
label: 'Full access for group administrators'
node_access_strict:
type: boolean
label: 'Strict node access permissions'
Expand Down
2 changes: 1 addition & 1 deletion og.module
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use Drupal\user\UserInterface;
/**
* Implements hook_entity_insert().
*
* Subscribe the group manager.
* Subscribe the group administrator.
*/
function og_entity_insert(EntityInterface $entity) {
// Invalidate cache tags if new group content is created.
Expand Down
4 changes: 2 additions & 2 deletions og_ui/src/Form/AdminSettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public function buildForm(array $form, FormStateInterface $form_state) {

$form['og_group_manager_full_access'] = [
'#type' => 'checkbox',
'#title' => $this->t('Group manager has full permissions'),
'#description' => $this->t('When enabled the group manager will have all the permissions in the group.'),
'#title' => $this->t('Group administrator has full permissions'),
'#description' => $this->t('When enabled the group administrator will have all the permissions in the group.'),
'#default_value' => $config_og->get('group_manager_full_access'),
];

Expand Down
6 changes: 3 additions & 3 deletions src/Plugin/Field/FieldFormatter/GroupSubscribeFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ public function viewElements(FieldItemListInterface $items, $langcode) {

$user = $this->entityTypeManager->getStorage('user')->load(($this->currentUser->id()));
if (($group instanceof EntityOwnerInterface) && ($group->getOwnerId() == $user->id())) {
// User is the group manager.
// User is the group administrator.
$elements[0] = [
'#type' => 'html_tag',
'#tag' => 'span',
'#attributes' => [
'title' => $this->t('You are the group manager'),
'title' => $this->t('You are the group administrator'),
'class' => ['group', 'manager'],
],
'#value' => $this->t('You are the group manager'),
'#value' => $this->t('You are the group administrator'),
];

return $elements;
Expand Down
4 changes: 2 additions & 2 deletions src/Plugin/Field/FieldType/OgGroupItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
* OG Group Data class to return TRUE always.
*
* This field type is used simply as a placeholder for a field formatter that
* would allow non-groups members, members, and group managers to join, request
* would allow non-groups members, members, and group administrators to join, request
* or leave a group.
*
* @FieldType(
* id = "og_group",
* label = @Translation("OG Group"),
* description = @Translation("allow non-groups members, members, and group managers to join, request or leave a group"),
* description = @Translation("allow non-groups members, members, and group administrators to join, request or leave a group"),
* category = @Translation("OG"),
* no_ui = TRUE,
* default_formatter = "og_group_subscribe",
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/Field/GroupSubscribeFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ protected function setUp(): void {
public function testGroupOwner() {
$this->drupalSetCurrentUser($this->user);
$elements = $this->getElements();
$this->assertEquals('You are the group manager', $elements[0]['#value']);
$this->assertEquals('You are the group administrator', $elements[0]['#value']);
}

/**
Expand Down
12 changes: 6 additions & 6 deletions tests/src/Kernel/GroupManagerSubscriptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Drupal\user\Entity\User;

/**
* Tests if the group manager is subscribed automatically upon group creation.
* Tests if the group administrator is subscribed automatically upon group creation.
*
* @group og
*/
Expand Down Expand Up @@ -91,7 +91,7 @@ protected function setUp(): void {
}

/**
* Tests whether a group manager is subscribed when creating a group.
* Tests whether a group administrator is subscribed when creating a group.
*
* @dataProvider groupManagerSubscriptionProvider
*/
Expand Down Expand Up @@ -166,16 +166,16 @@ protected function isMembershipOverridden(OgMembershipInterface $membership = NU
* @return array
* An array of test data arrays, each test data array having the following
* three values:
* - A boolean indicating whether or not the group manager will be marked as
* - A boolean indicating whether or not the group administrator will be marked as
* the author of the group when the entity is created.
* - A boolean indicating whether or not another hook_entity_insert() will
* fire first and will override the membership.
*/
public static function groupManagerSubscriptionProvider() {
return [
// Test a group created by the group manager.
// Test a group created by the group administrator.
[
// Whether or not to set the group manager as author of the group
// Whether or not to set the group administrator as author of the group
// entity.
TRUE,
// Whether or not another hook_entity_insert() implementation will fire
Expand All @@ -187,7 +187,7 @@ public static function groupManagerSubscriptionProvider() {
FALSE,
FALSE,
],
// Test a group created by the group manager, but the subscription will be
// Test a group created by the group administrator, but the subscription will be
// already be created by another hook_entity_insert() implementation. This
// allows us to test whether developers can override the automatic
// creation of the membership.
Expand Down