LIST-LUXEMBOURG / iguess

iGuess 1.0 - The iGuess implementation in Rails
GNU General Public License v3.0
6 stars 0 forks source link

hydro-atlas and ecosystem test web sites show registered data sets from Aberdeen #145

Closed uleopold closed 10 years ago

uleopold commented 10 years ago

The hydro-atlas and the ecosystem instances show Aberdeen data sets in the data manager although they have not been registered.

It might be wrongly associated to GD Luxembourg in the data base.

selection_149

selection_150

ldesousa commented 10 years ago

This is not a bug, it is a feature. When a user with role 2 logs in, iGUESS fetches the first city id it finds in the cookies (I imagine this is the last city visited) and presents all datasets related to that city. I can not find any error in the code and this behaviour is in line with what Chris has explained. I also have a recollection of this behaviour being discussed in the past.

If this behaviour is to be changed I would prefer to have a different issue with detailed objectives.

uleopold commented 10 years ago

The displayed web services belong to Aberdeen City which is neither part of hydro-atlas nor of ecosystem. In addition, they are shown for GD Luxembourg although they hav not been registered under GD Luxembourg. There is clearly somethig wrong when it shows registered data sets from another instance and City, in this case Aberdeen City under iguess.tudor.lu under the instances hydro-atlas and ecosystem for GD Luxembourg. If I unregistere these data sets now, they will be also unregistered under iguesss for aberdeen City.

This is not a feature and does not need new objective definitions. It does not work as expected, which is that I want to see data sets under GD Luxembourg in either hydro-atlas or ecosystem which I have been registering for these instances and the GD Luxembourg area. I do not want to see data sets originating form a registration process from another instance and another City.

Maybe IDs in the city tables are confused here or something else goes wrong.

eykamp commented 10 years ago

Aberdeen is the first city in the database. When an instance can't figure out what city to show for a logged in user, it reverts to the first city. The problem is that the user you are using is, I'm guessing, not registered with hydro-atlas. If you create a new user associated with hydro-atlas, the problem will go away.

This is related to the issue I logged on my last day in the office -- users can log into any instance. When they log into the wrong instance, weird things like this happen. The fix is to check which instance a user registered for (we know their home city, which is uniquely associated with an instance), and not let them log into any other instance.

This will probably require tweaking the Devise user management system, or possibly creating a separate server and database for each instance (this would work, but I think it would be the wrong solution).

On 9/8/2014 1:07 AM, Ulrich Leopold wrote:

The displayed web services belong to Aberdeen City which is neither part of hydro-atlas nor of ecosystem. In addition, they are shown for GD Luxembourg although they hav not been registered under GD Luxembourg. There is clearly somethig wrong when it shows registered data sets from another instance and City, in this case Aberdeen City under iguess.tudor.lu under the instances hydro-atlas and ecosystem for GD Luxembourg. If I unregistere these data sets now, they will be also unregistered under iguesss for aberdeen City.

This is not a feature and does not need new objective definitions. It does not work as expected, which is that I want to see data sets under GD Luxembourg in either hydro-atlas or ecosystem which I have been registering for these instances and the GD Luxembourg area. I do not want to see data sets originating form a registration process from another instance and another City.

Maybe IDs in the city tables are confused here or something else goes wrong.

— Reply to this email directly or view it on GitHub https://github.com/CRTE/iguess/issues/145#issuecomment-54787434.

uleopold commented 10 years ago

Ok, but why does it work with LaMiLo? I never registered for LaMiLo either. Is it because it can find the city I am registered with in both instances (which is Luxembourg)? If so, could we add Luxembourg City and the problem would disappear for now?

uleopold commented 10 years ago

The above works as a temporary solution. This issue will can be closed and a new one will be opened for modification of the user management.

eykamp commented 10 years ago

No -- the Luxembourg in LaMiLo is completely different than the Luxembourg in iGUESS. They are two different cities, each having the name Luxembourg, and the same coordinates. Each city is associated with exactly one instance; the fact that the same city appears to belong to two instances is an illusion -- they are two different records in the cities table, each with a different id.

I can't tell you why you don't see the problem with LaMiLo without looking at which city id is selected for the same user on each instance. There is a cookie that remembers your city, and there is (I think) a different cookie for each instance (we didn't code it that way deliberately, it's just that the browser sees different URLs for each instance and treats them as independent sites, storing different cookies for each). So it may be that you have cookies associated with one instance and not another.

On 9/8/2014 6:02 AM, Ulrich Leopold wrote:

Ok, but why does it work with LaMiLo? I never registered for LaMiLo either. Is it because it can find the city I am registered with in both instances (which is Luxembourg)? If so, could we add Luxembourg City and the problem would disappear for now?

— Reply to this email directly or view it on GitHub https://github.com/CRTE/iguess/issues/145#issuecomment-54813699.

ldesousa commented 10 years ago

As I wrote initially, the data presented to this category of users seems to be determined uniquely by what is registered in the cookie. When I log on to the Hydro-altas I get the Luxemburg/LaMiLo data; when I log on to LaMiLo I sometimes get the Aberdeen/MUSIC data (the city I use the most for testing).