-
-
Notifications
You must be signed in to change notification settings - Fork 728
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add project owners to personal dashboard (#8293)
This PR adds all user-type owners of projects that you have access to to the personal dashboard payload. It adds the new `projectOwners` property regardless of whether you have access to any projects or not because it required less code and fewer conditionals, but we can do the filtering if we want to. To add the owners, it uses the private project checker to get accessible projects before passing those to the project owner read model, which has a new method to fetch user owners for projects.
- Loading branch information
1 parent
b726a22
commit 6188079
Showing
9 changed files
with
196 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,35 @@ export const personalDashboardSchema = { | |
additionalProperties: false, | ||
required: ['projects', 'flags'], | ||
properties: { | ||
projectOwners: { | ||
type: 'array', | ||
description: | ||
'Users with the project owner role in Unleash. Only contains owners of projects that are visible to the user.', | ||
items: { | ||
type: 'object', | ||
required: ['ownerType', 'name'], | ||
properties: { | ||
ownerType: { | ||
type: 'string', | ||
enum: ['user'], | ||
}, | ||
name: { | ||
type: 'string', | ||
example: 'User Name', | ||
}, | ||
imageUrl: { | ||
type: 'string', | ||
nullable: true, | ||
example: 'https://example.com/image.jpg', | ||
}, | ||
email: { | ||
type: 'string', | ||
nullable: true, | ||
example: '[email protected]', | ||
}, | ||
}, | ||
}, | ||
}, | ||
projects: { | ||
type: 'array', | ||
items: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters