// Remove a member from the team.
542106
func (s *Service) TeamMemberDelete(ctx context.Context, teamIdentity string, teamMemberIdentity string) (*TeamMember, error) {
	var teamMember TeamMember
	return &teamMember, s.Delete(ctx, &teamMember, fmt.Sprintf("/teams/%v/members/%v", teamIdentity, teamMemberIdentity))
}
1070148
func (s *Service) TeamDelete(ctx context.Context, teamIdentity string) (*Team, error) {
	var team Team
	return &team, s.Delete(ctx, &team, fmt.Sprintf("/teams/%v", teamIdentity))
}
1091271
func (ss *Snapshot) remove() error {
	if err := os.Remove(ss.Path); err != nil {
		return err
	}
	return nil
}
1294865
func (s *Supervisor) Remove(id ServiceToken) error {
	sID := supervisorID(id.id >> 32)
	if sID != s.id {
		return ErrWrongSupervisor
	}
	// no meaningful error handling if this is false
	_ = s.sendControl(removeService{serviceID(id.id & 0xffffffff), nil})
	return nil
}
1274927
func (s *GroupService) Remove(groupname string, username string) (*Response, error) {
	apiEndpoint := fmt.Sprintf("/rest/api/2/group/user?groupname=%s&username=%s", groupname, username)
	req, err := s.client.NewRequest("DELETE", apiEndpoint, nil)
	if err != nil {
		return nil, err
	}

	resp, err := s.client.Do(req, nil)
	if err != nil {
		jerr := NewJiraError(resp, err)
		return resp, jerr
	}

	return resp, nil
}
1144254
func (t *Team) RemoveMember(uid int64) error {
	return RemoveTeamMember(t.OrgID, t.ID, uid)
}
51318
func (b *PersonJSONBuilder) Remove(info *PersonPropertyInfo) *PersonJSONBuilder {
	delete(b._properties, info.fieldName)
	return b
}
665621
func (s *Scheduler) Remove(j interface{}) {
	i := 0
	found := false

	for ; i < s.size; i++ {
		if s.jobs[i].jobFunc == getFunctionName(j) {
			found = true
			break
		}
	}

	if !found {
		return
	}

	for j := (i + 1); j < s.size; j++ {
		s.jobs[i] = s.jobs[j]
		i++
	}
	s.size = s.size - 1
}
1336536
func (c *CollaboratorsController) Remove(ctx *app.RemoveCollaboratorsContext) error {
	return proxy.RouteHTTP(ctx, c.config.GetAuthShortServiceHostName())
}
1274877
func (rl *List) Remove() error {
	conn := rl.pool.Get(rl.dbindex)
	_, err := conn.Do("DEL", rl.id)
	return err
}
779295
func (t *TeamsService) RemoveMembership(uri *Hyperlink, uriParams M) (success bool, result *Result) {
	url, err := ExpandWithDefault(uri, &TeamMembershipURL, uriParams)
	if err != nil {
		return false, &Result{Err: err}
	}
	result = t.client.delete(url, nil, nil)
	success = (result.Response.StatusCode == 204)
	return
}
528493
func (service *BaseService) Remove(name string) Service {
	service.methodManager.Remove(name)
	return service
}
1281376
func (m *Last2FAManager) RemoveByUser(username string) error {
	_, err := m.collection.RemoveAll(bson.M{"username": username})
	return err
}
1319042
func removeMember(tel string, members []string) []string {
	for i, m := range members {
		if m == tel {
			members = append(members[:i], members[i+1:]...)
			break
		}
	}
	return members
}
904727
func (ip *Interpreter) remove(args []string) {
	ip.simpleResponder(ip.Backend.RemoveUserFromGroup(args[0], args[1]))
}
908961
func (hs *HTTPServer) AddTeamMember(c *m.ReqContext, cmd m.AddTeamMemberCommand) Response {
	cmd.OrgId = c.OrgId
	cmd.TeamId = c.ParamsInt64(":teamId")

	if err := teamguardian.CanAdmin(hs.Bus, cmd.OrgId, cmd.TeamId, c.SignedInUser); err != nil {
		return Error(403, "Not allowed to add team member", err)
	}

	if err := hs.Bus.Dispatch(&cmd); err != nil {
		if err == m.ErrTeamNotFound {
			return Error(404, "Team not found", nil)
		}

		if err == m.ErrTeamMemberAlreadyAdded {
			return Error(400, "User is already added to this team", nil)
		}

		return Error(500, "Failed to add Member to Team", err)
	}

	return JSON(200, &util.DynMap{
		"message": "Member added to Team",
	})
}
976997
func (s *Service) IdentityProviderDeleteByTeam(ctx context.Context, teamName string, identityProviderID string) (*IdentityProvider, error) {
	var identityProvider IdentityProvider
	return &identityProvider, s.Delete(ctx, &identityProvider, fmt.Sprintf("/teams/%v/identity-providers/%v", teamName, identityProviderID))
}