JS for checking if user in people picker or user is author

Forums Classic DFFS JS for checking if user in people picker or user is author

Viewing 1 reply thread
  • Author
    Posts
    • #30691
      Jon Whisman
      Participant

      Hi,

      I see the 2 functions below in spjs.dffs. Can these be used in our JS code, or are these back-end only?

      I have tried to use, but they are not working as I expect.

      spjs.dffs.isUserAuthor()

      spjs.dffs.isUserInPicker()

      Is there a certain syntax for each if these can be used in our JS to check for a user role? Or do we have to use the DFFS rules for these? All of our logic is JS, so preferably, we’d like these user checks within our JS as well.

      Thanks in advance!

    • #30693
      Alexander Bautz
      Keymaster

      Hi,
      The “spjs.dffs.isUserAuthor” function is intended for internal use, but you can use the spjs.dffs.isUserInPicker function like this:

      var isInPicker = spjs.dffs.isUserInPicker("NameOfPeoplePicker", "Eq");

      Alexander

Viewing 1 reply thread
  • You must be logged in to reply to this topic.