From a7d8aecae32bcfe8c149f16cb140e638157cf0e8 Mon Sep 17 00:00:00 2001 From: myarmolinsky Date: Tue, 10 Dec 2024 08:34:15 -0500 Subject: [PATCH] `application-membership.create`: Update description to reflect that the user must already be a member of the organization Change-type: patch --- DOCUMENTATION.md | 2 +- src/models/application-membership.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index d0d39677f..c03003bf5 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -1372,7 +1372,7 @@ balena.models.application.membership.getAllByUser(123).then(function(memberships ###### membership.create(options) ⇒ Promise -This method adds a user to an application by their username. +This method adds a user to an application by their username if they are a member of the organization. **Kind**: static method of [membership](#balena.models.application.membership) **Summary**: Creates a new membership for an application diff --git a/src/models/application-membership.ts b/src/models/application-membership.ts index 39eaeb9f0..8cc46aed6 100644 --- a/src/models/application-membership.ts +++ b/src/models/application-membership.ts @@ -225,7 +225,7 @@ const getApplicationMembershipModel = function ( * @function * @memberof balena.models.application.membership * - * @description This method adds a user to an application by their username. + * @description This method adds a user to an application by their username if they are a member of the organization. * * @param {Object} options - membership creation parameters * @param {String|Number} options.application - application handle (string), or id (number)