register current user as a global context
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { UmbCurrentUserContext } from './current-user.context.js';
|
||||
import { manifests as modalManifests } from './modals/manifests.js';
|
||||
import { manifests as userProfileAppsManifests } from './user-profile-apps/manifests.js';
|
||||
import type { ManifestTypes } from '@umbraco-cms/backoffice/extension-registry';
|
||||
@@ -9,6 +10,12 @@ export const headerApps: Array<ManifestTypes> = [
|
||||
name: 'Current User Store',
|
||||
loader: () => import('./current-user-history.store.js'),
|
||||
},
|
||||
{
|
||||
type: 'globalContext',
|
||||
alias: 'Umb.GlobalContext.CurrentUser',
|
||||
name: 'Current User',
|
||||
api: UmbCurrentUserContext,
|
||||
},
|
||||
{
|
||||
type: 'headerApp',
|
||||
alias: 'Umb.HeaderApp.CurrentUser',
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
import { UmbCurrentUserContext } from './current-user/index.js';
|
||||
import type { UmbEntryPointOnInit } from '@umbraco-cms/backoffice/extension-api';
|
||||
|
||||
export const onInit: UmbEntryPointOnInit = (host, extensionRegistry) => {
|
||||
new UmbCurrentUserContext(host);
|
||||
};
|
||||
@@ -17,10 +17,4 @@ export const manifests = [
|
||||
...currentUserManifests,
|
||||
...userPermissionManifests,
|
||||
...modalManifests,
|
||||
{
|
||||
name: 'User Management Entry Point',
|
||||
alias: 'Umb.EntryPoint.UserManagement',
|
||||
type: 'entryPoint',
|
||||
loader: () => import('./entry-point.js'),
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user