Copying user access in database

(3 posts) (2 voices)

Tags:

No tags yet.

  1. maron, Member

    Hello.

    We are switching all users to use Google Authentication instead of mydbr authentication.

    I had the idea that I could easily switch the users access rights to the new google user with a simple update statement:

    update mydbr_reports_priv set username = 'newgoogleidusername' where username = 'oldmydbrusername';

    This however doesn't work, and now I cannot give permissions at all to the new user in mydbr.

    Is there some kind of caching or other mechanism that is preventing me from doing this?

    Best regards,

    Maron

  2. myDBR Team, Key Master

    Maron,
    what is preventing you from giving the permissions? Do user's exist in myDBR? As you change authentication to Google Authentication, myDBR does not know the users until they have logged in.

    A user in myDBR is combination of username and authentication (not just username). In case of Google Authentication, the username is the ID from Oauth2 userinfo and authentication is Single Sign-On (authentication_id = 4).

    So, instead of converting the existing users to new ones, create new ones; once you have them, you can generate the privileges based on old privileges.

    --
    myDBR Team

  3. maron, Member

    Hi Again.

    This is what we are currently doing (logging users in with Google first before changing permissions from mydbr user to google in db) - I was missing the authentication part, it was still 2.

    All fixed by changing authentication to 4 also - thanks.


Reply

You must log in to post.