mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 21:33:27 +00:00
* enforce restrictions based on collection type, set default collection type * fix ts strict errors * fix default collection enforcement in vault header * enforce default collection restrictions in vault collection row * enforce default collection restrictions in AC vault header * enforce default collection restriction for select all * fix ts strict error * switch to signal, fix feature flag * fix story * clean up * remove feature flag, move check for defaultCollecion to CollecitonView * fix test * remove unused configService * fix test: coerce null to undefined for collection Id * clean up leaky abstraction for default collection * fix ts-strict error * fix parens * add new property to models, update logic, refactor for ts-strict * fix type * rename defaultCollection getter * clean up * clean up * clean up, add comment, fix submit * add comment * add feature flag * check model for name * cleanup readonly logic, remove featureflag logic * wip * refactor CollectionRequest into Create and Update models * fix readonly logic * cleanup * set defaultUserCollectionEmail in decryption from Collection * split save into update/create methods * fix readonly logic * fix collections post and put requests * add defaultUserCollection email to model when submitting collection dialog
29 lines
930 B
TypeScript
29 lines
930 B
TypeScript
import { Observable } from "rxjs";
|
|
|
|
import { CollectionDetailsResponse } from "@bitwarden/admin-console/common";
|
|
import { UserId } from "@bitwarden/common/types/guid";
|
|
|
|
import { CollectionAccessSelectionView, CollectionAdminView } from "../models";
|
|
|
|
export abstract class CollectionAdminService {
|
|
abstract collectionAdminViews$(
|
|
organizationId: string,
|
|
userId: UserId,
|
|
): Observable<CollectionAdminView[]>;
|
|
abstract update(
|
|
collection: CollectionAdminView,
|
|
userId: UserId,
|
|
): Promise<CollectionDetailsResponse>;
|
|
abstract create(
|
|
collection: CollectionAdminView,
|
|
userId: UserId,
|
|
): Promise<CollectionDetailsResponse>;
|
|
abstract delete(organizationId: string, collectionId: string): Promise<void>;
|
|
abstract bulkAssignAccess(
|
|
organizationId: string,
|
|
collectionIds: string[],
|
|
users: CollectionAccessSelectionView[],
|
|
groups: CollectionAccessSelectionView[],
|
|
): Promise<void>;
|
|
}
|