Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-9835

onDelete-Roles will query all members of the role - to test that a single member exists.

    XMLWordPrintable

    Details

      Description

      To test if it is valid to delete the role, the 'onDelete-roles.js' script will query all members of that role, only to test that a single user exists in the members array.

      Suggestion:

      Enhance the script to set a pageSize of 1 so that only 1 object is created/retrieved to test if the members list is empty and thus, safe to delete the role.  Also set the fields list to only retrieve the '_id' field, thus avoiding any retrieval of costly virtual or relationship fields. 

       

        Attachments

          Activity

            People

            Assignee:
            jason.vincent jason vincent
            Reporter:
            jason.vincent jason vincent
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: