check with trailing slash
This commit is contained in:
@@ -10,6 +10,7 @@ import { umbLocalizationRegistry } from '@umbraco-cms/backoffice/localization';
|
||||
import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry';
|
||||
import { UMB_SECTION_PATH_PATTERN } from '@umbraco-cms/backoffice/section';
|
||||
import { UMB_APP_CONTEXT } from '@umbraco-cms/backoffice/app';
|
||||
import { ensurePathEndsWithSlash } from '@umbraco-cms/backoffice/utils';
|
||||
|
||||
export class UmbCurrentUserContext extends UmbContextBase<UmbCurrentUserContext> {
|
||||
#currentUser = new UmbObjectState<UmbCurrentUserModel | undefined>(undefined);
|
||||
@@ -86,7 +87,7 @@ export class UmbCurrentUserContext extends UmbContextBase<UmbCurrentUserContext>
|
||||
const appContext = await this.getContext(UMB_APP_CONTEXT);
|
||||
const backofficePath = appContext.getBackofficePath();
|
||||
|
||||
if (url.pathname === backofficePath) {
|
||||
if (url.pathname === ensurePathEndsWithSlash(backofficePath)) {
|
||||
const sectionManifest = await this.#firstAllowedSection();
|
||||
if (!sectionManifest) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user