Warren Buckley
09/19/2024, 3:09 PMUMB_CURRENT_USER_CONTEXT
@Markus Johansson @Kevin Jump ?
I am not sure its exported from Umbraco or not, I can consume the context with the string underneath the TOKEN.
typescript
// Can't do :(
this.consumeContext(UMB_CURRENT_USER_CONTEXT, (currentUserCtx) =>{
console.log('currentUserCtx', currentUserCtx);
});
// Can do this - but no typings
this.consumeContext('UmbCurrentUserContext', (currentUserCtx) =>{
console.log('currentUserCtx', currentUserCtx);
});
Warren Buckley
09/19/2024, 3:10 PMWarren Buckley
09/19/2024, 3:12 PMUmb.GlobalContext.CurrentUser
so I assumed the underlying string for the TOKEN would be the same - but nope its UmbCurrentUserContext
😛Warren Buckley
09/19/2024, 3:16 PMimport { UMB_CURRENT_USER_CONTEXT } from '@umbraco-cms/backoffice/current-user';
Warren Buckley
09/19/2024, 3:16 PMJacob Overgaard
09/20/2024, 6:46 AMWarren Buckley
09/20/2024, 6:54 AMMarkus Johansson
09/20/2024, 1:07 PM