/** * Offers the necessary functionality to query user privileges. * * @deprecated Use @studyportals/client-internal-platform-authorization */ export interface IUserPrivilegesDataHelper { /** * Checks whether the specified user can generate reports. * * @param username The username of the user whose privileges are to be checked. */ canGenerateReports(username: string): Promise; /** * Checks whether the specified user can delete reports. * * @param username The username of the user whose privileges are to be checked. */ canDeleteReports(username: string): Promise; /** * Checks whether the specified user can access the given organisation. * * @param username The username of the user whose privileges are to be checked. * @param organisationId The ID of the targeted organisation. */ canAccessOrganisation(username: string, organisationId: string): Promise; /** * Filters an array of organisation IDs, considering whether the given user has access to their data. * * @param username The username of the user whose privileges are to be checked. * @param organisationIds The IDs of the targeted organisations. */ filterOrganisationsByUserAccess(username: string, organisationIds: string[]): Promise; /** * Filters an array of campaign IDs, considering whether the given user has access to their data. * * @param username The username of the user whose privileges are to be checked. * @param campaignIds The IDs of the targeted organisations. */ filterCampaignsByUserAccess(username: string, campaignIds: string[]): Promise; /** * Checks whether the specified user can access the given campaign. * * @param username The username of the user whose privileges are to be checked. * @param campaignId The ID of the targeted campaign. */ canAccessCampaign(username: string, campaignId: string): Promise; /** * Checks whether the specified user can initiate an invalidation for the given campaign. * * @param username * @param campaignId */ canInitiateInvalidation(username: string, campaignId: string): Promise; }