public async Task CanUpdateTeamMapping() { var newLDAPMapping = new NewLdapMapping(_distinguishedNameTeam); var ldapTeam = await _github.Enterprise.Ldap.UpdateTeamMapping(_context.TeamId, newLDAPMapping); Assert.NotNull(ldapTeam); Assert.NotNull(ldapTeam.LdapDistinguishedName); Assert.Equal(ldapTeam.LdapDistinguishedName, _distinguishedNameTeam); // Get Team and check mapping was updated var checkTeam = await _github.Organization.Team.Get(_context.TeamId); Assert.Equal(checkTeam.Name, ldapTeam.Name); Assert.Equal(checkTeam.LdapDistinguishedName, _distinguishedNameTeam); }
public async Task CanUpdateUserMapping() { var newLDAPMapping = new NewLdapMapping(_distinguishedNameUser); var ldapUser = await _github.Enterprise.Ldap.UpdateUserMapping(_testUser, newLDAPMapping); Assert.NotNull(ldapUser); Assert.NotNull(ldapUser.LdapDistinguishedName); Assert.Equal(ldapUser.LdapDistinguishedName, _distinguishedNameUser); // Get user and check mapping was updated var checkUser = await _github.User.Get(_testUser); Assert.Equal(checkUser.Login, ldapUser.Login); Assert.Equal(checkUser.LdapDistinguishedName, _distinguishedNameUser); }
public async Task CanUpdateTeamMapping() { var newLDAPMapping = new NewLdapMapping(_distinguishedNameTeam); var observable = _github.Enterprise.Ldap.UpdateTeamMapping(_context.TeamId, newLDAPMapping); var ldapTeam = await observable; Assert.NotNull(ldapTeam); Assert.NotNull(ldapTeam.LdapDistinguishedName); Assert.Equal(ldapTeam.LdapDistinguishedName, _distinguishedNameTeam); // Get Team and check mapping was updated var checkTeam = await _github.Organization.Team.Get(_context.TeamId); Assert.Equal(checkTeam.Name, ldapTeam.Name); Assert.Equal(checkTeam.LdapDistinguishedName, _distinguishedNameTeam); }
public async Task CanUpdateUserMapping() { var newLDAPMapping = new NewLdapMapping(_distinguishedNameUser); var observable = _github.Enterprise.Ldap.UpdateUserMapping(_testUser, newLDAPMapping); var ldapUser = await observable; Assert.NotNull(ldapUser); Assert.NotNull(ldapUser.LdapDistinguishedName); Assert.Equal(ldapUser.LdapDistinguishedName, _distinguishedNameUser); // Get user and check mapping was updated var checkUser = await _github.User.Get(_testUser); Assert.Equal(checkUser.Login, ldapUser.Login); Assert.Equal(checkUser.LdapDistinguishedName, _distinguishedNameUser); }
/// <summary> /// Update the LDAP mapping for a team on a GitHub Enterprise appliance (must be Site Admin user). /// </summary> /// <remarks> /// https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-team /// </remarks> /// <param name="teamId">The teamId to update LDAP mapping</param> /// <param name="newLdapMapping">The <see cref="NewLdapMapping"/></param> /// <returns>The <see cref="Team"/> object.</returns> public IObservable <Team> UpdateTeamMapping(int teamId, NewLdapMapping newLdapMapping) { return(_client.UpdateTeamMapping(teamId, newLdapMapping).ToObservable()); }
/// <summary> /// Update the LDAP mapping for a user on a GitHub Enterprise appliance (must be Site Admin user). /// </summary> /// <remarks> /// https://developer.github.com/v3/enterprise/ldap/#update-ldap-mapping-for-a-user /// </remarks> /// <param name="userName">The username to update LDAP mapping</param> /// <param name="newLdapMapping">The <see cref="NewLdapMapping"/></param> /// <returns>The <see cref="User"/> object.</returns> public IObservable <User> UpdateUserMapping(string userName, NewLdapMapping newLdapMapping) { return(_client.UpdateUserMapping(userName, newLdapMapping).ToObservable()); }