yavsc/web/Views/Admin/RoleList.aspx

19 lines
651 B
Plaintext

<%@ Page Title="Liste des rôles" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %>
10 years ago
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
Roles:
<ul>
<%foreach (string rolename in (string[]) Model){ %>
<li><%=rolename%> <% if (Roles.IsUserInRole("Admin")) { %>
<%= Html.ActionLink("Supprimer","RemoveRole", new { rolename = rolename }, new { @class="actionlink" } ) %>
<% } %></li>
<% } %>
</ul>
<% if (Roles.IsUserInRole("Admin")) { %>
<%= Html.ActionLink("Ajouter un rôle","AddRole", null, new { @class="actionlink" } ) %>
<% } %>
</asp:Content>