Hi there,
I have an MVC application that among other things contains a small Silverlight menu that is displayed as part of the .Master page used in most pages.
I have also written a MembershipProvider (and a role provider) that uses my app's database for authenticating and authorizing users. Works fine.
However, I want the Silverlight menu to contain some extra items if the user is in the admin role. Of course one possibility is to make two Silverlight menu applications and choose which one to display based on the user in the master page. But this has a ring of ugly to me.
The better option would be if the Silverlight app could figure out the identity of the logged in user is and use it to configure itself to show the admin options.
Is there a simple way to do something like this? The MVC application and the Silverlight app(s) are deployed on the same IIS7 server and part of the same solution.
The solutions I have found on the web so far either prompt the user for a separate login inside the Silverlight application, or do a lot of work with WCF services. If I have to, I'll go that route, but I am stuck with a feeling that there should be an elegant, easy way to do this.
I believe firmly in the KISS principle so simplicity is highly appreciated!
Thanks!