grantPrivilegesToRole and revokePrivilegesFromRole should reject empty 'privileges' argument

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.5.5
    • Affects Version/s: 2.5.3
    • Component/s: Security
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      > db.runCommand(

      { grantPrivilegesToRole: "roleName", privileges: [] }

      )
      > db.runCommand(

      { revokePrivilegesFromRole: "roleName", privileges: [] }

      )

      expect commands to fail, because 'privileges' array is empty. Instead, get

      { "ok" : 1 }

      This is a bug for the sake of consistency with other role-related commands. For example, the grantRoleToRole() and grantRoleToUser() commands will fail if you pass an empty 'roles' array to either. These commands require at least one specified granted role in order to succeed.

            Assignee:
            Spencer Brody (Inactive)
            Reporter:
            Samantha Ritter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: