Adds UI to enrole members
This commit is contained in:
@ -1,3 +1,14 @@
|
||||
2015-11-04 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* Web.csproj:
|
||||
* AppAdmin.master:
|
||||
* AddRole.aspx:
|
||||
* OAuth2.cs:
|
||||
* RoleList.aspx:
|
||||
* UsersInRole.aspx:
|
||||
* AdminController.cs:
|
||||
* AddMemberToRole.ascx:
|
||||
|
||||
2015-11-04 Paul Schneider <paul@pschneider.fr>
|
||||
|
||||
* instdbws.sql:
|
||||
|
@ -24,12 +24,11 @@ namespace Yavsc.Controllers
|
||||
/// </summary>
|
||||
public ActionResult Index()
|
||||
{
|
||||
// FIXME do this in a new installation script.
|
||||
if (!Roles.RoleExists (roleName)) {
|
||||
Roles.CreateRole (roleName);
|
||||
YavscHelpers.Notify (ViewData, roleName + " " + LocalizedText.role_created);
|
||||
|
||||
}
|
||||
|
||||
return View ();
|
||||
}
|
||||
/// <summary>
|
||||
|
@ -76,7 +76,7 @@ namespace Yavsc.Helpers.Google
|
||||
{
|
||||
string scope = string.Join ("%20", scopeOpenid);
|
||||
|
||||
string prms = String.Format ("response_type=code&client_id={0}&redirect_uri={1}&scope={2}&state={3}&include_granted_scopes=false",
|
||||
string prms = String.Format ("response_type=code&client_id={0}&redirect_uri={1}&scope={2}&state={3}&include_granted_scopes=false&approval_prompt=force",
|
||||
CLIENT_ID, RedirectUri, scope, state);
|
||||
GetAuthResponse (bresp, prms);
|
||||
}
|
||||
|
@ -58,6 +58,7 @@ else {%> Yavsc.notice(<%=note.body%>, <%=note.click_action%>); <% } %>
|
||||
<li><%= Html.ActionLink("Restaurations", "Restore") %></li>
|
||||
<li><%= Html.ActionLink("Create backup","CreateBackup") %></li>
|
||||
<li><%= Html.ActionLink("Remove user", "RemoveUser") %></li>
|
||||
<li><%= Html.ActionLink("Add a Role ", "AddRole") %></li>
|
||||
<li><%= Html.ActionLink("Remove role", "RemoveRoleQuery") %></li>
|
||||
<li><%= Html.ActionLink("User list", "UserList") %></li>
|
||||
<li><%= Html.ActionLink("Role list", "RoleList") %></li>
|
||||
|
11
web/Views/Admin/AddMemberToRole.ascx
Normal file
11
web/Views/Admin/AddMemberToRole.ascx
Normal file
@ -0,0 +1,11 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
|
||||
|
||||
<%= Html.ValidationSummary() %>
|
||||
<% using(Ajax.BeginForm())
|
||||
{ %>
|
||||
Nom du rôle :
|
||||
<%= Html.TextBox( "RoleName" ) %>
|
||||
<%= Html.ValidationMessage("RoleName", "*") %><br/>
|
||||
<input class="actionlink" type="submit"/>
|
||||
<% } %>
|
||||
|
@ -9,6 +9,7 @@ Nom du rôle :
|
||||
<%= Html.ValidationMessage("RoleName", "*") %><br/>
|
||||
<input class="actionlink" type="submit"/>
|
||||
<% } %>
|
||||
<%= Html.Partial("AddMemberToRole")%>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ Roles:
|
||||
<ul>
|
||||
<%foreach (string rolename in (string[]) Model){ %>
|
||||
|
||||
<li><%=rolename%> <% if (Roles.IsUserInRole("Admin")) { %>
|
||||
<li><%=Html.ActionLink(rolename,"UsersInRole", new { rolename = rolename }, new { @class="actionlink" } )%> <% if (Roles.IsUserInRole("Admin")) { %>
|
||||
<%= Html.ActionLink("Supprimer","RemoveRole", new { rolename = rolename }, new { @class="actionlink" } ) %>
|
||||
<% } %></li>
|
||||
<% } %>
|
||||
|
11
web/Views/Admin/UsersInRole.aspx
Normal file
11
web/Views/Admin/UsersInRole.aspx
Normal file
@ -0,0 +1,11 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head runat="server">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</body>
|
@ -252,7 +252,6 @@
|
||||
<Content Include="Views\Admin\Backups.aspx" />
|
||||
<Content Include="Views\Admin\Restore.aspx" />
|
||||
<Content Include="Views\Admin\Restored.aspx" />
|
||||
<Content Include="Views\Admin\Index.aspx" />
|
||||
<Content Include="Views\FrontOffice\Estimates.aspx" />
|
||||
<Content Include="Catalog.xml" />
|
||||
<Content Include="RegistrationMail.txt" />
|
||||
@ -469,6 +468,9 @@
|
||||
<Content Include="App_Themes\images\star-939235_1280.jpg" />
|
||||
<Content Include="App_Themes\images\star-939235_1280.s.jpg" />
|
||||
<Content Include="App_Themes\images\star-939235_1280.xxs.jpg" />
|
||||
<Content Include="Views\Admin\AddMemberToRole.ascx" />
|
||||
<Content Include="Views\Admin\UsersInRole.aspx" />
|
||||
<Content Include="Views\Admin\Index.aspx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||
|
Reference in New Issue
Block a user