Add simple_oauth_password_grant dependency for farm_fieldkit

This commit is contained in:
Paul Weidner 2023-10-30 12:41:08 -07:00 committed by Michael Stenta
parent 66da1b7330
commit d0e305d0c1
3 changed files with 17 additions and 0 deletions

View File

@ -43,6 +43,7 @@
"drupal/migrate_tools": "^6.0.2",
"drupal/role_delegation": "^1.2",
"drupal/simple_oauth": "6.0.0-beta5",
"drupal/simple_oauth_password_grant": "^1.0@RC",
"drupal/state_machine": "1.8",
"drupal/subrequests": "^3.0.6",
"drupal/token": "^1.11",

View File

@ -6,3 +6,4 @@ core_version_requirement: ^10
dependencies:
- entity:entity
- farm:farm_api
- simple_oauth_password_grant:simple_oauth_password_grant

View File

@ -0,0 +1,15 @@
<?php
/**
* @file
* Post update functions for farm_fieldkit module.
*/
/**
* Enable simple oauth password grant.
*/
function farm_fieldkit_post_update_enable_password_grant(&$sandbox = NULL) {
if (!\Drupal::service('module_handler')->moduleExists('simple_oauth_password_grant')) {
\Drupal::service('module_installer')->install(['simple_oauth_password_grant']);
}
}