lxd/rbac/server.go
func (r *Server) DeleteProject(id int64) error {
	// Update RBAC
	err := r.postResources(nil, []string{strconv.FormatInt(id, 10)}, false)
	if err != nil {
		return err
	}

	// Update project map
	r.resourcesLock.Lock()
	for k, v := range r.resources {
		if v == strconv.FormatInt(id, 10) {
			delete(r.resources, k)
			break
		}
	}
	r.resourcesLock.Unlock()

	return nil
}
func (r *Server) DeleteProject(id int64) error {
	// Update RBAC
	err := r.postResources(nil, []string{strconv.FormatInt(id, 10)}, false)
	if err != nil {
		return err
	}

	// Update project map
	r.resourcesLock.Lock()
	for k, v := range r.resources {
		if v == strconv.FormatInt(id, 10) {
			delete(r.resources, k)
			break
		}
	}
	r.resourcesLock.Unlock()

	return nil
}
func ( r * Server ) DeleteProject ( id int64 ) error { // Update RBAC err := r . postResources ( nil , [ ] string { strconv . FormatInt ( id , 10 ) } , false ) if err != nil { return err } // Update project map r . resourcesLock . Lock ( ) for k , v := range r . resources { if v == strconv . FormatInt ( id , 10 ) { delete ( r . resources , k ) break } } r . resourcesLock . Unlock ( ) return nil }
// DeleteProject adds a new project resource to RBAC.
DeleteProject adds a new project resource to RBAC .