[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 3bbeb56 commit a067afe
Show file tree
Hide file tree
Showing 19 changed files with 132 additions and 1,418 deletions.
6 changes: 0 additions & 6 deletions packages/webui/src/client/collections/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ 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 @@ -77,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 @@ -125,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 a067afe

Please sign in to comment.