mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
[AC-2286] [Defect] - CLI: User creating a collection through the CLI does not have access to the collection (#9409)
* Send current Org user Id on collection creation through CLI * Run npm prettier * Add organization services to CreateCommand creation on ServeCommand * Refactor organization data models to include organizationUserId property * Refactor create command to utilize the OrganizationUserId on the Organization object * Add users to collection request in edit command * fix: organization.data test update to correct deserialization, refs AC-2286 --------- Co-authored-by: Vincent Salucci <vincesalucci21@gmail.com>
This commit is contained in:
@@ -39,6 +39,7 @@ describe("ORGANIZATIONS state", () => {
|
||||
permissions: undefined,
|
||||
resetPasswordEnrolled: false,
|
||||
userId: "userId",
|
||||
organizationUserId: "organizationUserId",
|
||||
hasPublicAndPrivateKeys: false,
|
||||
providerId: "providerId",
|
||||
providerName: "providerName",
|
||||
|
||||
@@ -36,6 +36,7 @@ export class OrganizationData {
|
||||
permissions: PermissionsApi;
|
||||
resetPasswordEnrolled: boolean;
|
||||
userId: string;
|
||||
organizationUserId: string;
|
||||
hasPublicAndPrivateKeys: boolean;
|
||||
providerId: string;
|
||||
providerName: string;
|
||||
@@ -96,6 +97,7 @@ export class OrganizationData {
|
||||
this.permissions = response.permissions;
|
||||
this.resetPasswordEnrolled = response.resetPasswordEnrolled;
|
||||
this.userId = response.userId;
|
||||
this.organizationUserId = response.organizationUserId;
|
||||
this.hasPublicAndPrivateKeys = response.hasPublicAndPrivateKeys;
|
||||
this.providerId = response.providerId;
|
||||
this.providerName = response.providerName;
|
||||
|
||||
@@ -43,6 +43,7 @@ export class Organization {
|
||||
permissions: PermissionsApi;
|
||||
resetPasswordEnrolled: boolean;
|
||||
userId: string;
|
||||
organizationUserId: string;
|
||||
hasPublicAndPrivateKeys: boolean;
|
||||
providerId: string;
|
||||
providerName: string;
|
||||
@@ -113,6 +114,7 @@ export class Organization {
|
||||
this.permissions = obj.permissions;
|
||||
this.resetPasswordEnrolled = obj.resetPasswordEnrolled;
|
||||
this.userId = obj.userId;
|
||||
this.organizationUserId = obj.organizationUserId;
|
||||
this.hasPublicAndPrivateKeys = obj.hasPublicAndPrivateKeys;
|
||||
this.providerId = obj.providerId;
|
||||
this.providerName = obj.providerName;
|
||||
|
||||
@@ -36,6 +36,7 @@ export class ProfileOrganizationResponse extends BaseResponse {
|
||||
permissions: PermissionsApi;
|
||||
resetPasswordEnrolled: boolean;
|
||||
userId: string;
|
||||
organizationUserId: string;
|
||||
providerId: string;
|
||||
providerName: string;
|
||||
providerType?: ProviderType;
|
||||
@@ -86,6 +87,7 @@ export class ProfileOrganizationResponse extends BaseResponse {
|
||||
this.permissions = new PermissionsApi(this.getResponseProperty("permissions"));
|
||||
this.resetPasswordEnrolled = this.getResponseProperty("ResetPasswordEnrolled");
|
||||
this.userId = this.getResponseProperty("UserId");
|
||||
this.organizationUserId = this.getResponseProperty("OrganizationUserId");
|
||||
this.providerId = this.getResponseProperty("ProviderId");
|
||||
this.providerName = this.getResponseProperty("ProviderName");
|
||||
this.providerType = this.getResponseProperty("ProviderType");
|
||||
|
||||
Reference in New Issue
Block a user