diff --git a/src/core/features/usertours/services/user-tours.ts b/src/core/features/usertours/services/user-tours.ts index ed328b406..ff42e12f1 100644 --- a/src/core/features/usertours/services/user-tours.ts +++ b/src/core/features/usertours/services/user-tours.ts @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +import { CoreConstants } from '@/core/constants'; import { asyncInstance } from '@/core/utils/async-instance'; import { Injectable } from '@angular/core'; import { CoreDatabaseTable } from '@classes/database/database-table'; @@ -60,6 +61,10 @@ export class CoreUserToursService { * @returns Whether the User Tour is pending or not. */ async isPending(id: string): Promise { + if (CoreConstants.CONFIG.disableUserTours || CoreConstants.CONFIG.disabledUserTours?.includes(id)) { + return false; + } + const isAcknowledged = await this.table.hasAnyByPrimaryKey({ id }); return !isAcknowledged; diff --git a/src/types/config.d.ts b/src/types/config.d.ts index ef01af18a..024c0dfb7 100644 --- a/src/types/config.d.ts +++ b/src/types/config.d.ts @@ -34,6 +34,8 @@ export interface EnvironmentConfig { languages: Record; databaseOptimizations?: Partial; databaseTableOptimizations?: Record>; + disableUserTours?: boolean; + disabledUserTours?: string[]; wsservice: string; demo_sites: Record; zoomlevels: Record;