check access rights when fechting template
checking templates rights in a normal query - work in progress!