Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • UmbracoR2D2 2 posts 22 karma points
    Jan 23, 2012 @ 14:13
    UmbracoR2D2
    0

    how to duplicate users permissions using SQL queries

    Hello!

    I'm a beginner in Umbraco but i'm very skilled in MS SQL Server.

    I need to create an User2 with the same nodes permissions of the User1.
    How I can correctly copy the users permissions from an user to another using sql queries?

    In my case, set the grant for this users are very complex so, after created the permission for the User1, i tried to execute on SQL server the follow query:

    INSERT INTO umbracoUser2NodePermission ( userId, nodeId, permission )
    SELECT [USER2_ID] , umbracoUser2NodePermission.nodeId, umbracoUser2NodePermission.permission
    FROM umbracoUser2NodePermission
    WHERE (((umbracoUser2NodePermission.userId)=[USER1_ID]));

    In the umbracoUser2NodePermission table the new rows appear correctly, but it don't works: enternig in the backoffice the user permission aren't change.

    How i can resolve this problem?

  • UmbracoR2D2 2 posts 22 karma points
    Jan 23, 2012 @ 14:18
    UmbracoR2D2
    0

    I'm on umbraco 4.7.1.

     

    thank you

  • Rodion Novoselov 694 posts 859 karma points
    Jan 23, 2012 @ 15:31
    Rodion Novoselov
    0

    AFAIK, Umbraco caches user permissions having been read from the database - perhaps that's the very case. I would just try to recycle the apppool.

Please Sign in or register to post replies

Write your reply to:

Draft