mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Trimming authenticated and anonymous roles from the UserRoles editor template
--HG-- branch : dev
This commit is contained in:
@@ -4,7 +4,10 @@
|
|||||||
<legend><%=_Encoded("Roles")%></legend>
|
<legend><%=_Encoded("Roles")%></legend>
|
||||||
<% if (Model.Roles.Count > 0) {
|
<% if (Model.Roles.Count > 0) {
|
||||||
var index = 0;
|
var index = 0;
|
||||||
foreach (var entry in Model.Roles) {%>
|
foreach (var entry in Model.Roles) {
|
||||||
|
if (string.Equals(entry.Name, "Authenticated", StringComparison.OrdinalIgnoreCase) || string.Equals(entry.Name, "Anonymous", StringComparison.OrdinalIgnoreCase)) {
|
||||||
|
continue;
|
||||||
|
}%>
|
||||||
<%=Html.Hidden("Roles[" + index + "].RoleId", entry.RoleId)%>
|
<%=Html.Hidden("Roles[" + index + "].RoleId", entry.RoleId)%>
|
||||||
<%=Html.Hidden("Roles[" + index + "].Name", entry.Name)%>
|
<%=Html.Hidden("Roles[" + index + "].Name", entry.Name)%>
|
||||||
<div>
|
<div>
|
||||||
|
Reference in New Issue
Block a user