none
Get Library Folders with "AddListItem" permission for current user in SPFx RRS feed

  • Question

  • Hi,

    I have a SPFx webpart with react. I want to show list of "sharepoint library folders" to which current logged in user is having "AddListItem" permission.

    Currently, I am trying this using Pnp js as below,

    web.lists.getByTitle("ListName").rootFolder.folders.get().then((item)=>{
          item.currentUserHasPermissions(PermissionKind.AddListItems);

        });

    I am getting "Property currentUserHasPermissions does not exists on type any[]."

    Please guide me to achieve the requirement. Thanks in advance.

    Friday, September 18, 2020 9:22 PM

All replies