code: func (m *Manager) UpdateGrant(username, globalID string, oldgrant, newgrant Grant) error {
  	// First remove the old grant
  	err := m.collection.Update(bson.M{"username": username, "globalid": globalID}, bson.M{"$pull": bson.M{"grants": oldgrant}})
  	if err != nil {
  		return err
  	}
  	// Now insert the new one
  	return m.collection.Update(bson.M{"username": username, "globalid": globalID}, bson.M{"$addToSet": bson.M{"grants": newgrant}})
  }
docs: // UpdateGrant updates an old grant to a new one