Skip to content

Commit

Permalink
now showing a warning message is roleprovider is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
troygoode committed Jul 30, 2011
1 parent 403a7e9 commit 6f17950
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<link href='@Url.Content("~/Content/MvcMembership.css")' rel="stylesheet" type="text/css" />
<link href='@Url.Content("~/Content/PagedList.css")' rel="stylesheet" type="text/css" />

@if(!Model.IsRolesEnabled){
<p class="mvcMembership-warning">WARNING: Your Role Provider is currently disabled - any user may currently visit this page.<br />Change &lt;roleManager enabled="false"&gt; to &lt;roleManager enabled="true"&gt; in your web.config file.</p>
}

<h2 class="mvcMembership">User Administration</h2>

<h3 class="mvcMembership">Users (@Html.ActionLink("New User", "CreateUser", "UserAdministration"))</h3>
Expand Down
11 changes: 10 additions & 1 deletion src/SampleWebsite.Mvc3/Content/MvcMembership.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
h3.mvcMembership{
p.mvcMembership-warning{
color: #cc0000;
font-weight: bold;
border: 2px solid #cc0000;
padding: 1em;
border-radius: .5em;
text-align: center;
}

h3.mvcMembership{
clear: left;
}

Expand Down

0 comments on commit 6f17950

Please sign in to comment.