Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public onInit(): Promise {
Log.info(LOG_SOURCE, 'Initialized LockItemCommandSet');
// this where we check the permissions
this._hasCorrectPermissions = this.context.pageContext.list.permissions.hasPermission(SPPermission.managePermissions);
// setting up the pnp to work correctly with SPFx
pnp.setup({
spfxContext: this.context
});
return Promise.resolve();
}