import * as angular from "angular";
import pnp, { PermissionKind } from "sp-pnp-js";
export class empController {
public userName: string = "";
public CurntUserId: number = 17; //siteadmin by default
public static $inject: string[] = ['DataService', '$window', "$scope"]; //import name based on app-mondule
constructor(private dataService: DataService, private $window: angular.IWindowService, private $scope: ng.IScope) {
// tslint:disable-next-line: no-shadowed-variable
pnp.sp.web.currentUser.get().then(result => {
this.CurntUserId = result.Id;
});
//this.$scope.$apply();
}
}
/*
Email:'admin@testdev.onmicrosoft.com'
Expiration:''
Id:17
IsEmailAuthenticationGuestUser:false
IsHiddenInUI:false
IsShareByEmailGuestUser:false
IsSiteAdmin:true
LoginName:'i:0#.f|membership|admin@testdev.onmicrosoft.com'
odata.editLink:'Web/GetUserById(17)'
odata.id:'https://test.sharepoint.com/sites/dev/_api/Web/GetUserById(17)'
odata.metadata:'https://test.sharepoint.com/sites/dev/_api/$metadata#SP.ApiData.Users1/@Element'
odata.type:'SP.User'
PrincipalType:1
Title:'Jai Saravanan'
UserId:{NameId: '10032000cd0feb72', NameIdIssuer: 'urn:federation:microsoftonline'}
UserPrincipalName:'admin@testdev.onmicrosoft.com'
__proto__:Object */
No comments:
Post a Comment