Skip to content

Commit

Permalink
Make sure comments are gender neutral
Browse files Browse the repository at this point in the history
Fixes Drupal.Commenting.GenderNeutralComment
.GenderNeutral error.
  • Loading branch information
mxr576 committed May 8, 2019
1 parent 23dba1c commit 930b0bb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
14 changes: 7 additions & 7 deletions apigee_edge.module
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ function apigee_edge_entity_view(array &$build, EntityInterface $entity, EntityV
* permission always.
* - If operation is "view" or "view label" then the user gets access allowed
* for the API Product (entity) if the API product's access attribute value is
* either one of the selected access attribute values OR s/he an a developer
* either one of the selected access attribute values OR it an a developer
* app that is in association with the selected API product.
* - If operation is "assign" then second part of the previous sentence does
* not apply only access attribute's value matters.
Expand All @@ -397,9 +397,9 @@ function apigee_edge_api_product_access(EntityInterface $entity, $operation, Acc
$product_visibility = $entity->getAttributeValue('access') ?? 'public';
$visible_to_roles = \Drupal::config($config_name)->get('access')[$product_visibility] ?? [];

// User may not have access to this API product based on the current
// access setting but we should still grant him/her view access
// if s/he has a developer app in association with this API product.
// A user may not have access to this API product based on the current
// access setting but we should still grant view access
// if it has a developer app in association with this API product.
if (empty(array_intersect($visible_to_roles, $account->getRoles()))) {
// We should not return allowed if the operation is "assign"
// just because a user has an app with the API product.
Expand Down Expand Up @@ -774,7 +774,7 @@ function apigee_edge_form_user_register_form_developer_email_validate(array $for
// Add email address to the whitelist because we do not want to
// display the same error message for an admin user as a regular user.
DeveloperEmailUniqueValidator::whitelist($form_state->getValue('mail'));
// If administrator has not confirmed that s/he would like to create a user
// If administrator has not confirmed that it would like to create a user
// in Drupal with an existing developer id on Apigee Edge then add a custom
// error to the field.
if (empty($form_state->getValue('apigee_edge_developer_exists'))) {
Expand Down Expand Up @@ -868,8 +868,8 @@ function _apigee_edge_existing_developer_email_verification_link(UserInterface $
/**
* Generates a token for an email address that is already taken on Apigee Edge.
*
* We do not want to enforce user to use the same first name, last name,
* username when this token is generated and whe s/he re-opens the registration
* We do not want to enforce a user to use the same first name, last name,
* username when this token is generated and when it re-opens the registration
* form by clicking on the link (that includes this token) from the verification
* email. Therefore we only use the email address for token generation.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function apigee_edge_apiproduct_rbac_api_product_access(EntityInterface $entity,
// Attribute is missing from the API product but the user already has an
// app with this API product. (Maybe someone assigned this API product
// to developer's app on Apigee Edge.) We have to grant access to the
// API product otherwise s/he could not see it on its developer app's
// API product otherwise it could not see it on its developer app's
// credentials list for example.
else {
$result = _apigee_edge_user_has_an_app_with_product($entity->id(), $account, TRUE);
Expand All @@ -87,11 +87,11 @@ function apigee_edge_apiproduct_rbac_api_product_access(EntityInterface $entity,
}
else {
$roles = explode(APIGEE_EDGE_APIPRODUCT_RBAC_ATTRIBUTE_VALUE_DELIMITER, $entity->getAttributeValue($rbac_attribute_name));
// User may not have access to this API product based on the current
// access control attribute value but we should still grant him/her access
// if s/he has a developer app in association with this API product.
// We should not provide him/her access if operation is "assign" just
// because s/he has an app with the API product.
// A user may not have access to this API product based on the current
// access control attribute value but we should still grant access
// if it has a developer app in association with this API product.
// We should not provide access if operation is "assign" just
// because it has an app with the API product.
// Displaying these products should be solved on the form level always.
if (empty(array_intersect($roles, $account->getRoles()))) {
if ('assign' === $operation) {
Expand Down
2 changes: 1 addition & 1 deletion src/ParamConverter/ApigeeEdgeLoadUnchangedEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* EntityConverter always loads the cached version of an entity. In our case
* this could cause inconsistency problems, especially on the entity edit forms.
* For example, a developer could easily remove a previously added API product
* (on Apigee Edge) from his/her app when modifies it on the Developer Portal.
* (on Apigee Edge) from its app when modifies it on the Developer Portal.
* This is why it is recommended to add "apigee_edge_load_unchanged_entity"
* option to the entity routes where non-cached data should be displayed.
*
Expand Down
8 changes: 4 additions & 4 deletions tests/src/Functional/ApiProductAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ protected function developerAppEditFormTest() {

// >> Bypass user.
$this->drupalLogin($this->users[self::USER_WITH_BYPASS_PERM]);
// Even if a user has bypass permission s/he should see only those API
// Products on on an other user's add/edit form that the other user has
// Even if a user has bypass permission it should see only those API
// Products on an other user's add/edit form that the other user has
// access.
$this->drupalGet(Url::fromRoute('entity.developer_app.add_form_for_developer', [
'user' => $this->users[AccountInterface::AUTHENTICATED_ROLE]->id(),
Expand All @@ -319,7 +319,7 @@ protected function developerAppEditFormTest() {
]));
$onlyPublicProductVisible();

// But on the its own add/edit app forms s/he should see all API products.
// But on the its own add/edit app forms it should see all API products.
$this->drupalGet(Url::fromRoute('entity.developer_app.add_form_for_developer', [
'user' => $this->users[self::USER_WITH_BYPASS_PERM]->id(),
]));
Expand Down Expand Up @@ -456,7 +456,7 @@ protected function messageIfUserShouldHaveAccessByRole(string $operation, UserIn
}

/**
* Error message, when a user should have access because s/he has bypass perm.
* Error message, when a user should have access because it has bypass perm.
*
* @param string $operation
* Operation on API product.
Expand Down

0 comments on commit 930b0bb

Please sign in to comment.