roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

why is the `user.org_id` changed permanently in the database when changing affiliation?

Open nicolasfranck opened this issue 3 years ago • 2 comments

Please complete the following fields as applicable:

What version of the DMPRoadmap code are you running? (e.g. v2.2.0)

3.0.4

Expected behaviour:

Changing affiliation should not have a permanent effect. If you relogin it should be reset to your real organisation

Actual behaviour:

Changing affiliation changes user.org_id in the table users

nicolasfranck avatar Feb 15 '22 09:02 nicolasfranck

I don't understand this. Why should changing affiliation not be permanent? I would have thought it should be permanent or it would be useless. Am I missing something?

raycarrick-ed avatar Feb 23 '22 09:02 raycarrick-ed

@raycarrick-ed because it is put on the template page. That page states that you can only view other templates if you change to that organisation. It does not state that you permanently change your affiliation you belong to (and become de facto org admin of that organisation).

Let's not forget that your users organisation is used on other places too, for example to determine the organisation of a newly created template. So just by changing affiliation for viewing, one starts creating templates for that organisation, which is maybe an unexpected side effect. Of course, a user has made that decision.

If only super admins can do this, why not convert this into a filter (with the first organisation selected by default), instead of making them org_admin of that organisation?

nicolasfranck avatar Feb 23 '22 10:02 nicolasfranck