Bazaar-backend: Add user entity field to members table

A new field has been added to the members table. When a user has
requested to be added to a project the "identityApi" is used to get the
entity ref of the user.

Signed-off-by: Niklas Aronsson <niklasar@axis.com>
This commit is contained in:
Niklas Aronsson
2022-08-18 07:31:33 +02:00
parent 452063b87d
commit 8554533546
8 changed files with 86 additions and 4 deletions
+26
View File
@@ -0,0 +1,26 @@
---
'@backstage/plugin-bazaar-backend': minor
---
**BREAKING** The bazaar-backend createRouter now requires that the `identityApi` is passed to the router.
These changes are **required** to `packages/backend/src/plugins/bazaar.ts`
The user entity ref is now added to the members table and is taken from the requesting user using the `identityApi`.
```diff
import { PluginEnvironment } from '../types';
import { createRouter } from '@backstage/plugin-bazaar-backend';
import { Router } from 'express';
export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
return await createRouter({
logger: env.logger,
config: env.config,
database: env.database,
+ identity: env.identity,
});
}
```