Skip to content

Commit

Permalink
docs: Custom App development by non-admins (#3145)
Browse files Browse the repository at this point in the history
* docs: custom app development by non-admins

* chore: link

* chore: link

* docs: rewrite

* docs: updates

* docs: updates

* docs: further updates

* docs: code review improvements

* docs: release note

* docs: release note review

* docs: tech writers review

* fix: links

* docs: remove login

* docs: change release day to 2023-11-08
  • Loading branch information
kark authored Nov 8, 2023
1 parent e987dbf commit 420af49
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 7 deletions.
8 changes: 7 additions & 1 deletion website/src/content/api-reference/application-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,18 @@ A `projectKey` of a commercetools Project you have access to. To be used as the
}
```

## `env.development.teamId`

<Info>

Local development and login are only allowed for users being part of the `Administrators` Team of your Organization.
Local development is allowed for users belonging to the `Administrators` Team of your Organization with no additional configuration required.

</Info>

If you need to apply more granular permissions for local development of a Custom Application, specify the `teamId` of the user's team.

For more information, see [Granular permissions for local development](/help-needed#granular-permissions-for-local-development).

## `env.production.applicationId`

The Custom Application ID is provided when you add a Custom Application in the Merchant Center (**Organizations > Custom Applications > Configure > Add**). See [Managing Custom Applications in the Merchant Center](https://docs.commercetools.com/merchant-center/managing-custom-applications) for more information.
Expand Down
17 changes: 11 additions & 6 deletions website/src/content/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ npx @commercetools-frontend/create-mc-app@latest \

To start with a [TypeScript](https://www.typescriptlang.org/) project, use the `--template=starter-typescript` flag. Read more about TypeScript in the [Adding TypeScript](/development/adding-typescript) page.

<Info>

Local development and login are only allowed for users being part of the `Administrators` Team of your Organization. Therefore, choose a Project that is part of an Organization where you are an administrator of.

</Info>

After the installation is complete, follow the instructions to start the development server:

```console
Expand Down Expand Up @@ -59,6 +53,17 @@ We recommend making yourself familiar the [Application Config](/api-reference/ap

By default the starter template is configured to use the [HTTP APIs in the GCP-EU Region](https://docs.commercetools.com/api/general-concepts#regions). If you plan to run the Custom Application in another environment, change the `cloudIdentifier` accordingly (see [list of cloud identifiers](/concepts/merchant-center-api#cloud-identifiers)).


## User access for local development

To start developing your Custom Application locally, choose a Project belonging to an Organization in which you are a member of the `Administrators` Team.

<Info>

As of version `22.5.0`, you have the option of assigning granular permissions to teams to enable local development. For more information, see [Granular permissions for local development](/help-needed#granular-permissions-for-local-development).

</Info>

# Related

For more information on what to do next, we recommend the following sections:
Expand Down
32 changes: 32 additions & 0 deletions website/src/content/help-needed.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,38 @@ See [Page reloading behavior](/concepts/merchant-center-proxy-router#page-reload

In the browser, the session token is stored in a secure cookie named `mcAccessToken` and is valid for 30 days.

# Granular permissions for local development

<Info>

This feature is available from version `22.5.0` onwards.

This method requires additional configuration and setup and is only recommended for development teams with prior experience in Custom Application development and installation.

</Info>

By default, developing a Custom Application requires you to be a member of the `Administrators` Team. However, for security reasons, your Organization might not be willing to grant administrator access to developers. In this case, an Organization can grant access using a regular team.

To enable this option, you must complete the following prerequisites in the Merchant Center (which can be done only with administrator rights):

1. [Configure the Custom Application in the Merchant Center](https://docs.commercetools.com/merchant-center/managing-custom-applications#configuring-custom-applications)

<Info>

For local development the Custom Application does not have to be deployed, and `Application URL` is not relevant. Therefore, any acceptable value can be provided in the registration form.

</Info>

2. [Assign the Application ID](https://docs.commercetools.com/merchant-center/managing-custom-applications#assigning-the-application-id)
3. [Install the Custom Application](https://docs.commercetools.com/merchant-center/managing-custom-applications#installing-a-custom-application)
4. [Create a team](https://docs.commercetools.com/merchant-center/teams#create-a-team) (or utilize an existing one)
5. Obtain the `teamId` from the Merchant Center URL
6. [Invite users to the team](https://docs.commercetools.com/merchant-center/teams#invite-users-to-a-team)
7. [Assign relevant permissions to the team](https://docs.commercetools.com/merchant-center/managing-custom-applications#assigning-team-permissions)

After completing these steps, you will have an `applicationId` and a `teamId`. You must provide these values for [`env.production.applicationId`](/api-reference/application-config#envproductionapplicationid) and [`env.development.teamId`](/api-reference/application-config#envdevelopmentteamid), respectively, in the Custom Application configuration file.

This process allows any member of the configured team to log in and perform local development for the Custom Application.

# Limitations

Expand Down
16 changes: 16 additions & 0 deletions website/src/releases/2023-11/user-access-for-local-development.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
date: 2023-11-08
title: Introduced granular permissions for local development of Custom Applications
description: Custom Applications can now be developed by members of a Team with limited permissions.
type: enhancement
topics:
- Merchant Center
- Development
- Configuration
---

You can now have teams with limited permissions develop Custom Applications locally. Previously, the option of local development was only available to members belonging to the `Administrators` team of an Organization.

For more information, see [Granular permissions for local development](/help-needed#granular-permissions-for-local-development) within the Custom Applications documentation.

As always, if you have questions or feedback, open a GitHub [discussion](https://github.com/commercetools/merchant-center-application-kit/discussions) or [issue](https://github.com/commercetools/merchant-center-application-kit/issues).

2 comments on commit 420af49

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for application-kit-custom-views ready!

✅ Preview
https://application-kit-custom-views-6a9sxe3me-commercetools.vercel.app

Built with commit 420af49.
This pull request is being automatically deployed with vercel-action

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for merchant-center-application-kit ready!

✅ Preview
https://merchant-center-application-292g6fa42-commercetools.vercel.app

Built with commit 420af49.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.