File tree 2 files changed +21
-15
lines changed
modules/apigee_edge_teams
2 files changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ use Drupal\apigee_edge\Plugin\EdgeKeyTypeInterface;
28
28
use Drupal\Core\Installer\InstallerKernel;
29
29
use Drupal\Core\Url;
30
30
use Drupal\user\RoleInterface;
31
- use Drupal\views\Views;
32
31
33
32
/**
34
33
* Implements hook_requirements().
@@ -321,20 +320,7 @@ function apigee_edge_update_8104() {
321
320
}
322
321
323
322
/**
324
- * Remove the "Manage team members and invitations" access for the Team invitations view .
323
+ * Deprecated update function .
325
324
*/
326
325
function apigee_edge_update_8105() {
327
- /** @var \Drupal\views\ViewExecutable $view */
328
- $view = Views::getView('team_invitations');
329
- $view->setDisplay('team');
330
- $access = $view->getDisplay()->getOption('access');
331
- if (empty($access['type']) || $access['type'] !== "team_permission") {
332
- return;
333
- }
334
-
335
- $view->getDisplay()->setOption('access', [
336
- 'type' => 'none',
337
- 'options' => [],
338
- ]);
339
- $view->save();
340
326
}
Original file line number Diff line number Diff line change 21
21
use Apigee\Edge\Utility\OrganizationFeatures;
22
22
use Drupal\Core\Config\FileStorage;
23
23
use Drupal\user\RoleInterface;
24
+ use Drupal\views\Views;
24
25
25
26
/**
26
27
* @file
@@ -139,3 +140,22 @@ function apigee_edge_teams_update_8703() {
139
140
user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, $authenticated_user_permissions);
140
141
}
141
142
}
143
+
144
+ /**
145
+ * Remove the "Manage team members and invitations" access for the Team invitations view.
146
+ */
147
+ function apigee_edge_teams_update_8704() {
148
+ if ($view = Views::getView('team_invitations')) {
149
+ $view->setDisplay('team');
150
+ $access = $view->getDisplay()->getOption('access');
151
+ if (empty($access['type']) || $access['type'] !== "team_permission") {
152
+ return;
153
+ }
154
+
155
+ $view->getDisplay()->setOption('access', [
156
+ 'type' => 'none',
157
+ 'options' => [],
158
+ ]);
159
+ $view->save();
160
+ }
161
+ }
You can’t perform that action at this time.
0 commit comments