Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-11527

Inconsistent arguments in grant/revoke roles/privileges to/from role

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.5.4
    • Affects Version/s: None
    • Component/s: Security
    • Minor Change
    • ALL

      grantRolesToRole takes a grantedRoles argument, thusly:

      { grantRolesToRole: "productsReaderWriter",
        grantedRoles: [
          { role: "productsReader", db: "products"}
        ],
        writeConcern: { w: "majority" , wtimeout: 5000 }
      }
      

      But for 'grantPrivilegesToRole, the argument is not 'grantedPrivileges', but simply 'privileges'.

      { grantPrivilegesToRole: "<role>",
        privileges: [
          { resource: { <resource> }, actions: [ "<action>", ... ] },
          ...
        ],
        writeConcern: <write concern document>
      }
      

      Similarly, revokeRolesFromRole has 'revokedRoles', but revokePrivelegesFromRole has just 'privileges'

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            bard.bloom@10gen.com bard.bloom@10gen.com
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: