Skip to content

Commit

Permalink
Fixed gender neutral language
Browse files Browse the repository at this point in the history
Using “they” instead of “it” for clarification
  • Loading branch information
cnovak committed May 16, 2019
1 parent 233dbe1 commit def9346
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions apigee_edge.module
Original file line number Diff line number Diff line change
Expand Up @@ -370,16 +370,16 @@ function apigee_edge_entity_view(array &$build, EntityInterface $entity, EntityV
*
* "assign" is a custom entity on API Products. It is being used on app
* create/edit forms. A developer may have view access to an API product but
* it can not assign it to an app (it can not obtain an API key for that
* they can not assign it to an app (they can not obtain an API key for that
* API product).
*
* Rules:
* - The user gets allowed if has "Bypass API Product access control"
* 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 it an a developer
* app that is in association with the selected API product.
* either one of the selected access attribute values OR if a developer
* app 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 @@ -399,7 +399,7 @@ function apigee_edge_api_product_access(EntityInterface $entity, $operation, Acc

// 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 they have 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 it would like to create a user
// If administrator has not confirmed that they 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 @@ -869,7 +869,7 @@ 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 a user to use the same first name, last name,
* username when this token is generated and when it re-opens the registration
* username when this token is generated and when they re-open 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,8 +76,8 @@ 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 it could not see it on its developer app's
// credentials list for example.
// API product otherwise they would not see the API product on the developer app's
// credentials list.
else {
$result = _apigee_edge_user_has_an_app_with_product($entity->id(), $account, TRUE);
if (!$result->isAllowed()) {
Expand All @@ -89,9 +89,9 @@ function apigee_edge_apiproduct_rbac_api_product_access(EntityInterface $entity,
$roles = explode(APIGEE_EDGE_APIPRODUCT_RBAC_ATTRIBUTE_VALUE_DELIMITER, $entity->getAttributeValue($rbac_attribute_name));
// 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.
// if they have 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.
// because they have 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 its app when modifies it on the Developer Portal.
* (on Apigee Edge) from their 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

0 comments on commit def9346

Please sign in to comment.