Merge pull request #478 from umbraco/bugfix/current-user
fix current user
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import { umbUsersData } from '../../../core/mocks/data/users.data';
|
||||
import { umbracoPath } from '@umbraco-cms/utils';
|
||||
import type { UserDetails } from '@umbraco-cms/models';
|
||||
import { UmbContextToken } from '@umbraco-cms/context-api';
|
||||
import { ObjectState } from '@umbraco-cms/observable-api';
|
||||
|
||||
export class UmbCurrentUserStore {
|
||||
|
||||
private _currentUser = new ObjectState<UserDetails | undefined>(undefined);
|
||||
//TODO: Temp solution to get a current user. Replace when we have a real user service
|
||||
private _currentUser = new ObjectState<UserDetails | undefined>(umbUsersData.getAll()[0]);
|
||||
public readonly currentUser = this._currentUser.asObservable();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user