[go: up one dir, main page]

Skip to content

Commit

Permalink
feat: remove broken accounts and auth in ui
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Aug 26, 2024
1 parent caa2a38 commit 92c6fe1
Show file tree
Hide file tree
Showing 19 changed files with 133 additions and 1,424 deletions.
10 changes: 1 addition & 9 deletions packages/webui/src/client/collections/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ import { ExternalMessageQueueObj } from '@sofie-automation/corelib/dist/dataMode
import { PackageContainerStatusDB } from '@sofie-automation/corelib/dist/dataModel/PackageContainerStatus'
import { MediaWorkFlow } from '@sofie-automation/shared-lib/dist/core/model/MediaWorkFlows'
import { MediaWorkFlowStep } from '@sofie-automation/shared-lib/dist/core/model/MediaWorkFlowSteps'
import { Meteor } from 'meteor/meteor'
import { Bucket } from '@sofie-automation/meteor-lib/dist/collections/Buckets'
import { ICoreSystem, SYSTEM_ID } from '@sofie-automation/meteor-lib/dist/collections/CoreSystem'
import { Evaluation } from '@sofie-automation/meteor-lib/dist/collections/Evaluations'
import { ExpectedPackageDB } from '@sofie-automation/corelib/dist/dataModel/ExpectedPackages'
import { createSyncMongoCollection, createSyncReadOnlyMongoCollection, wrapMongoCollection } from './lib'
import { createSyncMongoCollection, createSyncReadOnlyMongoCollection } from './lib'
import { PeripheralDevice } from '@sofie-automation/corelib/dist/dataModel/PeripheralDevice'
import { RundownLayoutBase } from '@sofie-automation/meteor-lib/dist/collections/RundownLayouts'
import { DBShowStyleBase } from '@sofie-automation/corelib/dist/dataModel/ShowStyleBase'
Expand All @@ -31,13 +30,11 @@ import { DBStudio } from '@sofie-automation/corelib/dist/dataModel/Studio'
import { TranslationsBundle } from '@sofie-automation/meteor-lib/dist/collections/TranslationsBundles'
import { DBTriggeredActions } from '@sofie-automation/meteor-lib/dist/collections/TriggeredActions'
import { UserActionsLogItem } from '@sofie-automation/meteor-lib/dist/collections/UserActionsLog'
import { DBUser } from '@sofie-automation/meteor-lib/dist/collections/Users'
import { AdLibAction } from '@sofie-automation/corelib/dist/dataModel/AdlibAction'
import { AdLibPiece } from '@sofie-automation/corelib/dist/dataModel/AdLibPiece'
import { DBPart } from '@sofie-automation/corelib/dist/dataModel/Part'
import { Piece } from '@sofie-automation/corelib/dist/dataModel/Piece'
import { PieceInstance } from '@sofie-automation/corelib/dist/dataModel/PieceInstance'
import { DBOrganization } from '@sofie-automation/meteor-lib/dist/collections/Organization'
import { PartInstance } from '@sofie-automation/meteor-lib/dist/collections/PartInstances'
import { DBRundown } from '@sofie-automation/corelib/dist/dataModel/Rundown'
import { RundownBaselineAdLibAction } from '@sofie-automation/corelib/dist/dataModel/RundownBaselineAdLibAction'
Expand Down Expand Up @@ -79,8 +76,6 @@ export const MediaWorkFlowSteps = createSyncReadOnlyMongoCollection<MediaWorkFlo
CollectionName.MediaWorkFlowSteps
)

export const Organizations = createSyncMongoCollection<DBOrganization>(CollectionName.Organizations)

export const PackageContainerStatuses = createSyncReadOnlyMongoCollection<PackageContainerStatusDB>(
CollectionName.PackageContainerStatuses
)
Expand Down Expand Up @@ -127,9 +122,6 @@ export const TriggeredActions = createSyncMongoCollection<DBTriggeredActions>(Co

export const UserActionsLog = createSyncReadOnlyMongoCollection<UserActionsLogItem>(CollectionName.UserActionsLog)

// This is a somewhat special collection, as it draws from the Meteor.users collection from the Accounts package
export const Users = wrapMongoCollection<DBUser>(Meteor.users as any, CollectionName.Users)

export function getCoreSystem(): ICoreSystem | undefined {
return CoreSystem.findOne(SYSTEM_ID)
}
14 changes: 0 additions & 14 deletions packages/webui/src/client/lib/localStorage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Settings } from '../lib/Settings'
import { getUserRoles } from '../lib/userInfo'
import {
setReportNotifications as libSetReportNotifications,
getReportNotifications as libGetReportNotifications,
Expand Down Expand Up @@ -50,19 +48,13 @@ export function setAllowStudio(studioMode: boolean): void {
localStorageSetCachedItem(LocalStorageProperty.STUDIO, studioMode ? '1' : '0')
}
export function getAllowStudio(): boolean {
if (Settings.enableUserAccounts) {
return !!getUserRoles().studio
}
return localStorageGetCachedItem(LocalStorageProperty.STUDIO) === '1'
}

export function setAllowConfigure(configureMode: boolean): void {
localStorageSetCachedItem(LocalStorageProperty.CONFIGURE, configureMode ? '1' : '0')
}
export function getAllowConfigure(): boolean {
if (Settings.enableUserAccounts) {
return !!getUserRoles().configurator
}
return localStorageGetCachedItem(LocalStorageProperty.CONFIGURE) === '1'
}

Expand All @@ -77,19 +69,13 @@ export function setAllowDeveloper(developerMode: boolean): void {
localStorageSetCachedItem(LocalStorageProperty.DEVELOPER, developerMode ? '1' : '0')
}
export function getAllowDeveloper(): boolean {
if (Settings.enableUserAccounts) {
return !!getUserRoles().developer
}
return localStorageGetCachedItem(LocalStorageProperty.DEVELOPER) === '1'
}

export function setAllowTesting(testingMode: boolean): void {
localStorageSetCachedItem(LocalStorageProperty.TESTING, testingMode ? '1' : '0')
}
export function getAllowTesting(): boolean {
if (Settings.enableUserAccounts) {
return !!getUserRoles().developer
}
return localStorageGetCachedItem(LocalStorageProperty.TESTING) === '1'
}

Expand Down
30 changes: 0 additions & 30 deletions packages/webui/src/client/lib/userInfo.ts

This file was deleted.

211 changes: 0 additions & 211 deletions packages/webui/src/client/ui/Account/AccountPage.tsx

This file was deleted.

Loading

0 comments on commit 92c6fe1

Please sign in to comment.