locked
Elevated permission in VS 2012 RRS feed

  • Question

  • My application has an employee table. For each employee, the application creates a user for the application and assigns it a base role. This work fine as long as the current user has SecurityAdministrion role.

    I found many example of how to elevate permission privilege for a specific action, such as "How to Elevate Permissions in Server Code (Ravi Eda)". However, when I try to replicate the exact same code in Visual Studio 2012, I get an error saying AddPermissions is not a valid member of class user.

    Because all the message I found seems to be from 2011, I wonder it the technic has change with the new version of LS?

    If not, am I missing an Import ?

    Thanks

    Sunday, January 6, 2013 7:26 PM

Answers

  • Hi,

    I tried to add a permission on server side and I have no problems in vs 2012.

    I think you try to do this on client side and not on server side.

    Try to open a table and open the inserted function. There you can add for example server side code.

    I hope this helps.

    Markus

    • Marked as answer by Ragoran Sunday, January 6, 2013 8:34 PM
    Sunday, January 6, 2013 7:57 PM

All replies

  • Hi,

    I tried to add a permission on server side and I have no problems in vs 2012.

    I think you try to do this on client side and not on server side.

    Try to open a table and open the inserted function. There you can add for example server side code.

    I hope this helps.

    Markus

    • Marked as answer by Ragoran Sunday, January 6, 2013 8:34 PM
    Sunday, January 6, 2013 7:57 PM
  • Markus,

    Thanks,

    I was adding the login the etity_updated event. I tried again and it works now...go figure

    Sunday, January 6, 2013 8:35 PM