func (VS *Server) deleteAllAccessByUser(c *gin.Context, userID bson.ObjectId, class string, method string, operation string) []Access {
	var acc []Access
	err := VS.DataBase.Find(&acc, bolthold.Where("IDUser").Eq(userID))
	VS.checkOperation(c, class, method, operation, err)
	for _, a := range acc {
		a.IsActive = false
		VS.addElementToDatabaseWithoutRegister(c, a, a.ID, "handlers_dataBase", "deleteAllAccessByUser", "v.addAuditToDatabase(c")
		VS.checkOperation(c, class, method, operation, err)
	}
	return acc
}
// This method DELETE all the access by User id
This method DELETE all the access by User id
// This method DELETE all the access by User id
func (VS *Server) deleteAllAccessByUser(c *gin.Context, userID bson.ObjectId, class string, method string, operation string) []Access {
	var acc []Access
	err := VS.DataBase.Find(&acc, bolthold.Where("IDUser").Eq(userID))
	VS.checkOperation(c, class, method, operation, err)
	for _, a := range acc {
		a.IsActive = false
		VS.addElementToDatabaseWithoutRegister(c, a, a.ID, "handlers_dataBase", "deleteAllAccessByUser", "v.addAuditToDatabase(c")
		VS.checkOperation(c, class, method, operation, err)
	}
	return acc
}
func ( VS * Server ) deleteAllAccessByUser ( c * gin . Context , userID bson . ObjectId , class string , method string , operation string ) [ ] Access { var acc [ ] Access err := VS . DataBase . Find ( & acc , bolthold . Where ( " " ) . Eq ( userID ) ) VS . checkOperation ( c , class , method , operation , err ) for _ , a := range acc { a . IsActive = false VS . addElementToDatabaseWithoutRegister ( c , a , a . ID , " " , " " , " " ) VS . checkOperation ( c , class , method , operation , err ) } return acc }
This method DELETE all the access by User id
This method DELETE all the access by User id