mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
Fetch the userInfo once loggedIn and expose the capability of admin (#7682)
* Fetch the userInfo once loggedIn and expose the cabilibility of admin * Rollback method * Return same use if defined * Use the same pepleContent service for UserInfoCOmpnent * Remove useless import * Use interface * Use angular resolver instead of guard * Remove fdescribe * Fix linting * Regenerate doc * Improve doc * Fix optional * Fix the unit test * Fix comment * Fix lint * Fix unit * Add fetch user as part of the ssoGuard * Fix unit test after fetch * Add additional unit * Fix await
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
|
||||
import { EcmCompanyModel } from '../models/ecm-company.model';
|
||||
import { PersonEntry, Person, PersonPaging } from '@alfresco/js-api';
|
||||
import { EcmUserModel } from '../models';
|
||||
|
||||
export const fakeEcmCompany: EcmCompanyModel = {
|
||||
organization: 'company-fake-name',
|
||||
@@ -30,7 +29,7 @@ export const fakeEcmCompany: EcmCompanyModel = {
|
||||
email: 'fakeCompany@fake.com'
|
||||
};
|
||||
|
||||
export const fakeEcmUser = new EcmUserModel({
|
||||
export const fakeEcmUser = {
|
||||
id: 'fake-id',
|
||||
firstName: 'fake-ecm-first-name',
|
||||
lastName: 'fake-ecm-last-name',
|
||||
@@ -49,7 +48,14 @@ export const fakeEcmUser = new EcmUserModel({
|
||||
userStatus: 'active',
|
||||
enabled: true,
|
||||
emailNotificationsEnabled: true
|
||||
});
|
||||
};
|
||||
|
||||
export const fakeEcmAdminUser = {
|
||||
...fakeEcmUser,
|
||||
capabilities: {
|
||||
isAdmin: true
|
||||
}
|
||||
};
|
||||
|
||||
export const fakeEcmUser2 = {
|
||||
id: 'another-fake-id',
|
||||
|
Reference in New Issue
Block a user