pnp / pnpjs

Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs
https://pnp.github.io/pnpjs/
Other
764 stars 305 forks source link

getLockedByUser only returns the current user. not other with file open. #3148

Closed Ofer-Gal closed 4 weeks ago

Ofer-Gal commented 1 month ago

What version of PnPjs library you are using

4.x

Minor Version Number

4.5.0

Target environment

SharePoint Framework

Additional environment details

Tring to find out if anyone has a certain file open before checkout inside a SPFx webpart authenticating with the context.

Question/Request

The code

     const file: IFile = await projWeb.getFileByServerRelativePath("/teams/3000.005/DPCDocuments/Turn OFF OneDrive Syncing.docx")
        const o:ISiteUserProps = await file.getLockedByUser();
        if (o)    console.log(o.Title, o.LoginName);

shows my name and login when I am the one with the file open. When someone else has the file open, o== null Is there a way to make it aware of other users with the file open? Thank you

juliemturner commented 4 weeks ago

We don't believe there is a way to do this today.

Ofer-Gal commented 4 weeks ago

Thanks

github-actions[bot] commented 3 weeks ago

This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.