func (VS *Server) hasAccess(c *gin.Context, userID bson.ObjectId, serviceID bson.ObjectId, class string, method string, operation string) bool {
	var access []Access
	err := VS.DataBase.Find(&access, bolthold.Where("IDUser").Eq(userID).And("IDService").Eq(serviceID).And("IsActive").Eq(true))
	VS.checkOperation(c, class, method, operation, err)
	if len(access) > 0 {
		return true
	}
	return false
}
// Returns true if the User given have access to the service given and false otherwise
Returns true if the User given have access to the service given and false otherwise
// Returns true if the User given have access to the service given and false otherwise
func (VS *Server) hasAccess(c *gin.Context, userID bson.ObjectId, serviceID bson.ObjectId, class string, method string, operation string) bool {
	var access []Access
	err := VS.DataBase.Find(&access, bolthold.Where("IDUser").Eq(userID).And("IDService").Eq(serviceID).And("IsActive").Eq(true))
	VS.checkOperation(c, class, method, operation, err)
	if len(access) > 0 {
		return true
	}
	return false
}
func ( VS * Server ) hasAccess ( c * gin . Context , userID bson . ObjectId , serviceID bson . ObjectId , class string , method string , operation string ) bool { var access [ ] Access err := VS . DataBase . Find ( & access , bolthold . Where ( " " ) . Eq ( userID ) . And ( " " ) . Eq ( serviceID ) . And ( " " ) . Eq ( true ) ) VS . checkOperation ( c , class , method , operation , err ) if len ( access ) > 0 { return true } return false }
Returns true if the User given have access to the service given and false otherwise
Returns true if the User given have access to the service given and false otherwise