Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-1597

REST "directory" resource returns two levels of "<directories>" element

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 2.0
    • 2.0
    • REST
    • None
    • Atlassian Crowd Version: 2.0-beta2 (Build:#401 - Jun 22, 2009)
      Report a bug Request a feature Contact Atlassian

      In the REST API, the URL below returns two levels of the <directories> element. Instead, the lower level should be <directory>:

      URL:

      http://localhost:8095/crowd/rest/admin/latest/directory

      Returns something like this:

      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
      - <directories>
      - <directories>
        <name>Active Directory</name> 
        <type>CONNECTOR</type> 
        <implementationClass>com.atlassian.crowd.integration.directory.connector.MicrosoftActiveDirectory</implementationClass> 
        </directories>
      - <directories>
        <name>Atlassian Crowd</name> 
        <type>INTERNAL</type> 
        <implementationClass>com.atlassian.crowd.integration.directory.internal.InternalDirectory</implementationClass> 
        </directories>
      - <directories>
        <name>Crowd Internal</name> 
        <type>INTERNAL</type> 
        <implementationClass>com.atlassian.crowd.integration.directory.internal.InternalDirectory</implementationClass> 
        </directories>
      - <directories>
        <name>Delegated Auth Directory</name> 
        <type>DELEGATING</type> 
        <implementationClass>com.atlassian.crowd.integration.directory.delegated.DelegatedAuthenticationDirectory</implementationClass> 
        </directories>
      - <directories>
        <name>Employees</name> 
        <type>INTERNAL</type> 
        <implementationClass>com.atlassian.crowd.integration.directory.internal.InternalDirectory</implementationClass> 
        </directories>
      - <directories>
        <name>My Own Connector</name> 
        <type>CUSTOM</type> 
        <implementationClass>com.atlassian.crowd.integration.directory.custom.MyOwnConnector</implementationClass> 
        </directories>
        </directories>
      

            [CWD-1597] REST "directory" resource returns two levels of "<directories>" element

            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Simplified Crowd Development Workflow v2 - restricted [ 1511070 ] New: JAC Bug Workflow v3 [ 3364072 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: Simplified Crowd Development Workflow v2 [ 1393094 ] New: Simplified Crowd Development Workflow v2 - restricted [ 1511070 ]
            Owen made changes -
            Workflow Original: Crowd Development Workflow v2 [ 272109 ] New: Simplified Crowd Development Workflow v2 [ 1393094 ]
            jawong.adm made changes -
            Workflow Original: JIRA Bug Workflow v2 [ 177678 ] New: Crowd Development Workflow v2 [ 272109 ]
            Justin Koke made changes -
            Link New: This issue incorporates CWD-1602 [ CWD-1602 ]
            Justin Koke made changes -
            Component/s New: REST [ 12950 ]
            Component/s Original: Backend / Domain Model [ 11545 ]
            Justin Koke made changes -
            Fix Version/s New: 2.0 [ 12269 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Verified [ 10005 ] New: Resolved [ 5 ]

            We now have the following data structures:
            Users:

            <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
            <users>
                <user>
                    <identifier>admin</identifier>
                    <username>admin</username>
                    <firstName>Super</firstName>
                    <lastName>User</lastName>
                    <displayName>Super User</displayName>
                    <emailAddress>admin@example.com</emailAddress>
                </user>
                <user>
                    <identifier>joe</identifier>
                    <username>joe</username>
                    <firstName>Joe</firstName>
                    <lastName>Small</lastName>
                    <displayName>Joe Small</displayName>
                    <emailAddress>joe@atlassian.com</emailAddress>
                </user>
            </users>
            

            Groups:

            <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
            <groups>
                <group>
                    <identifier>administrators</identifier>
                    <name>administrators</name>
                    <description>Generic Admin Role</description>
                    <type>LEGACY_ROLE</type>
                </group>
                <group>
                    <identifier>crowd-administrators</identifier>
                    <name>crowd-administrators</name>
                    <description/>
                    <type>GROUP</type>
                </group>
                <group>
                    <identifier>developers</identifier>
                    <name>developers</name>
                    <description>Generic Developer Role</description>
                    <type>LEGACY_ROLE</type>
                </group>
                <group>
                    <identifier>jira-administrators</identifier>
                    <name>jira-administrators</name>
                    <description>JIRA Admin Group</description>
                    <type>GROUP</type>
                </group>
                <group>
                    <identifier>jira-developers</identifier>
                    <name>jira-developers</name>
                    <description>JIRA Developer Group</description>
                    <type>GROUP</type>
                </group>
            </groups>
            

            Directories:

            <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
            <directories>
                <directory>
                    <name>Second Directory</name>
                    <type>INTERNAL</type>
                    <implementationClass>com.atlassian.crowd.integration.directory.internal.InternalDirectory</implementationClass>
                </directory>
                <directory>
                    <name>Test Internal Directory</name>
                    <type>INTERNAL</type>
                    <implementationClass>com.atlassian.crowd.integration.directory.internal.InternalDirectory</implementationClass>
                </directory>
            </directories>
            

            Justin Koke added a comment - We now have the following data structures: Users: <?xml version= "1.0" encoding= "UTF-8" standalone= "yes" ?> <users> <user> <identifier> admin </identifier> <username> admin </username> <firstName> Super </firstName> <lastName> User </lastName> <displayName> Super User </displayName> <emailAddress> admin@example.com </emailAddress> </user> <user> <identifier> joe </identifier> <username> joe </username> <firstName> Joe </firstName> <lastName> Small </lastName> <displayName> Joe Small </displayName> <emailAddress> joe@atlassian.com </emailAddress> </user> </users> Groups: <?xml version= "1.0" encoding= "UTF-8" standalone= "yes" ?> <groups> <group> <identifier> administrators </identifier> <name> administrators </name> <description> Generic Admin Role </description> <type> LEGACY_ROLE </type> </group> <group> <identifier> crowd-administrators </identifier> <name> crowd-administrators </name> <description/> <type> GROUP </type> </group> <group> <identifier> developers </identifier> <name> developers </name> <description> Generic Developer Role </description> <type> LEGACY_ROLE </type> </group> <group> <identifier> jira-administrators </identifier> <name> jira-administrators </name> <description> JIRA Admin Group </description> <type> GROUP </type> </group> <group> <identifier> jira-developers </identifier> <name> jira-developers </name> <description> JIRA Developer Group </description> <type> GROUP </type> </group> </groups> Directories: <?xml version= "1.0" encoding= "UTF-8" standalone= "yes" ?> <directories> <directory> <name> Second Directory </name> <type> INTERNAL </type> <implementationClass> com.atlassian.crowd.integration.directory.internal.InternalDirectory </implementationClass> </directory> <directory> <name> Test Internal Directory </name> <type> INTERNAL </type> <implementationClass> com.atlassian.crowd.integration.directory.internal.InternalDirectory </implementationClass> </directory> </directories>
            Justin Koke made changes -
            Status Original: Open [ 1 ] New: Verified [ 10005 ]

            SarahA added a comment -

            Similarly, I'd expect a <groups> element and a <group> element in this response:

            <restGroups>
              <groups>
              <identifier>my-team</identifier> 
              <name>my-team</name> 
              <description>My Team</description> 
              </groups>
            </restGroups>
            

            SarahA added a comment - Similarly, I'd expect a <groups> element and a <group> element in this response: <restGroups> <groups> <identifier> my-team </identifier> <name> my-team </name> <description> My Team </description> </groups> </restGroups>

              justin@atlassian.com Justin Koke
              smaddox SarahA
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: