Page Level Authentication RRS feed

  • Question

  • Thanks in advance.  I have HyperLink Buttons in a SL4 project.  Their visibility property is set to visible or collapsed based upon whether the user is logged into the system or not.  How do a set a "page level" attribute or property such that a user must be logged into the system to view the page.   I thought there was a page level attribute such that User.IsAuthenticated must be true.  The HyperLink button's visible property is bound to a converter, as seen below:

    <HyperlinkButton x:Name="LinkAdministration" Style="{StaticResource LinkStyle}"
                    NavigateUri="/Admin" TargetName="ContentFrame" Content="{Binding Path=ApplicationStrings.AdminPageTitle,
                    Source={StaticResource ResourceWrapper}}" Visibility="{Binding Path=User.IsAuthenticated,Converter={StaticResource myVisibilityConverter}, ConverterParameter=false}"/> 

    Is there a similar approach for a page?

    This is step one.  Then after I get this implemented, I'll need to make sure a user is in the appropriate "Role" to view the page.  Such that a query is implemented against the ASP Membership table to see if a user is in the appropriate role to view the respective page.  For example, if I  have a page to manager Events, once I figure out how to set a page level attribute such that the User.IsAuthenticated must be true, secondly, I’ll need to see which Event Role the user is in (Event Admin, Event User, etc) to determine their permissions on the page.

    Appreciate it.

    Tuesday, December 14, 2010 2:51 PM