locked
how can we set up permissions for a odata connector? RRS feed

  • Question

  • I have tried asking this question i have, please help. I have a ODATA Connector and a seperate light switch application which uses this Odata Connector. I need to set up permission on Odata connector ( like read and edit) so that it should reflect on my light switch app. any idea how to achieve this?

    Yuvan
    Tuesday, October 28, 2014 7:59 PM

All replies

  • Hi Yuvan,

    Welcome to LightSwitch forum.

    >>I need to set up permission on Odata connector ( like read and edit) so that it should reflect on my light switch app

    From your description above, you want to secure your Lightswitch application using Odata connector. I don't set permission on Odata connector side before. For this issue, I think you need consider using Windows authentication, or Form authentication, even apply a permission to restrict access to a screen in a LightSwitch application. For example:

    If Application.User.HasPermission(Can_View_Products) Then
                    result = True
                Else
                    result = False
                End If
    { 
    if (Application.User.HasPermission(Permissions.Can_View_Products)) { 
    result = true; 
    } else { 
    result = false; 
    }

    Reference: Restricting Access to a LightSwitch Screen

    Please let me know if there is anything that I can do to help.

    Best regards,

    Angie


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Angie Xu Friday, October 31, 2014 6:32 AM
    Friday, October 31, 2014 6:31 AM
  • Hi Angie,

    Thanks for your response. I think I know that how to restrict screen access with the code your posted above. But, What I am looking for is, may be I was not clear on my question. So, I have a ODATA Connector and 5 other Light switch apps which uses this ODATA Connector. So, I dont want to write code on all of these 5 light switch apps, rather I just want to write code and restrict access from my ODATA Connector application. Let me know if you got my question. Any ideas guys?

    Yuvan


    yuv

    Monday, November 3, 2014 5:07 PM