Skip to content

Commit

Permalink
Fixes #17254 Making 'Umb.Section.Content' as a const UMB_CONTENT_SECT…
Browse files Browse the repository at this point in the history
…ION_ALIAS that can be imported
  • Loading branch information
warrenbuckley committed Oct 14, 2024
1 parent d8b81ac commit 447b52a
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/mocks/data/user-group/user-group.data.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { UserGroupItemResponseModel, UserGroupResponseModel } from '@umbraco-cms/backoffice/external/backend-api';
import { UMB_CONTENT_SECTION_ALIAS } from '@umbraco-cms/backoffice/content';

export type UmbMockUserGroupModel = UserGroupResponseModel & UserGroupItemResponseModel;

Expand Down Expand Up @@ -34,7 +35,7 @@ export const data: Array<UmbMockUserGroupModel> = [
},
],
sections: [
'Umb.Section.Content',
UMB_CONTENT_SECTION_ALIAS,
'Umb.Section.Media',
'Umb.Section.Settings',
'Umb.Section.Members',
Expand Down Expand Up @@ -71,7 +72,7 @@ export const data: Array<UmbMockUserGroupModel> = [
'Umb.Document.Rollback',
],
permissions: [],
sections: ['Umb.Section.Content', 'Umb.Section.Media'],
sections: [UMB_CONTENT_SECTION_ALIAS, 'Umb.Section.Media'],
languages: [],
hasAccessToAllLanguages: true,
documentRootAccess: true,
Expand Down Expand Up @@ -124,7 +125,7 @@ export const data: Array<UmbMockUserGroupModel> = [
'Umb.Document.Notifications',
],
permissions: [],
sections: ['Umb.Section.Content'],
sections: [UMB_CONTENT_SECTION_ALIAS],
languages: [],
hasAccessToAllLanguages: true,
documentRootAccess: true,
Expand Down
1 change: 1 addition & 0 deletions src/packages/core/content/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const UMB_CONTENT_SECTION_ALIAS = 'Umb.Section.Content';
1 change: 1 addition & 0 deletions src/packages/core/content/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export * from './controller/merge-content-variant-data.controller.js';
export * from './property-dataset-context/content-property-dataset.context.js';
export * from './workspace/index.js';
export * from './collection/index.js';
export * from './constants.js';
export type * from './types.js';
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { UMB_CONTENT_SECTION_ALIAS } from '@umbraco-cms/backoffice/content';

export const manifests: Array<UmbExtensionManifest> = [
{
type: 'dashboard',
Expand All @@ -12,7 +14,7 @@ export const manifests: Array<UmbExtensionManifest> = [
conditions: [
{
alias: 'Umb.Condition.SectionAlias',
match: 'Umb.Section.Content',
match: UMB_CONTENT_SECTION_ALIAS,
},
],
},
Expand Down
1 change: 0 additions & 1 deletion src/packages/documents/section/constants.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/packages/documents/section/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UMB_CONTENT_SECTION_ALIAS } from './constants.js';
import { UMB_CONTENT_SECTION_ALIAS } from '@umbraco-cms/backoffice/content';
import { UMB_DOCUMENT_ROOT_ENTITY_TYPE, UMB_CONTENT_MENU_ALIAS } from '@umbraco-cms/backoffice/document';

export const manifests: Array<UmbExtensionManifest> = [
Expand Down
3 changes: 2 additions & 1 deletion src/packages/language/app-language-select/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { UMB_CONTENT_SECTION_ALIAS } from '@umbraco-cms/backoffice/content';
export const manifests: Array<UmbExtensionManifest> = [
{
type: 'sectionSidebarApp',
Expand All @@ -8,7 +9,7 @@ export const manifests: Array<UmbExtensionManifest> = [
conditions: [
{
alias: 'Umb.Condition.SectionAlias',
match: 'Umb.Section.Content',
match: UMB_CONTENT_SECTION_ALIAS,
},
{
alias: 'Umb.Condition.MultipleAppLanguages',
Expand Down
3 changes: 2 additions & 1 deletion src/packages/umbraco-news/manifests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ManifestDashboard } from '@umbraco-cms/backoffice/dashboard';
import { UMB_CONTENT_SECTION_ALIAS } from '@umbraco-cms/backoffice/content';

export const dashboard: ManifestDashboard = {
type: 'dashboard',
Expand All @@ -12,7 +13,7 @@ export const dashboard: ManifestDashboard = {
conditions: [
{
alias: 'Umb.Condition.SectionAlias',
match: 'Umb.Section.Content',
match: UMB_CONTENT_SECTION_ALIAS,
},
],
};

0 comments on commit 447b52a

Please sign in to comment.