Browse Source

Moved identity users page to it's own assembly.

pull/81/head
Halil İbrahim Kalkan 10 years ago
parent
commit
622deac5bb
  1. 7
      Volo.Abp.sln
  2. 4
      src/AbpDesk/AbpDesk.Web.Mvc/AbpDeskWebMvcModule.cs
  3. 8
      src/AbpDesk/AbpDesk.Web.Mvc/Navigation/MainMenuContributor.cs
  4. 3
      src/AbpDesk/AbpDesk.Web.Mvc/project.json
  5. 1
      src/Volo.Abp.Identity.HttpProxy/Volo/Abp/Identity/AbpIdentityHttpProxyModule.cs
  6. 24
      src/Volo.Abp.Identity.Web/AbpIdentityWebMainMenuContributor.cs
  7. 34
      src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs
  8. 5
      src/Volo.Abp.Identity.Web/Controllers/UsersController.cs
  9. 27
      src/Volo.Abp.Identity.Web/Properties/launchSettings.json
  10. 0
      src/Volo.Abp.Identity.Web/Views/Users/Index.cshtml
  11. 25
      src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.xproj
  12. 23
      src/Volo.Abp.Identity.Web/project.json

7
Volo.Abp.sln

@ -102,6 +102,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Volo.Abp.Identity.HttpApi.H
EndProject EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Volo.Abp.Identity.HttpProxy", "src\Volo.Abp.Identity.HttpProxy\Volo.Abp.Identity.HttpProxy.xproj", "{00B240B6-EC44-461A-9578-EF4F1BE9C688}" Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Volo.Abp.Identity.HttpProxy", "src\Volo.Abp.Identity.HttpProxy\Volo.Abp.Identity.HttpProxy.xproj", "{00B240B6-EC44-461A-9578-EF4F1BE9C688}"
EndProject EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Volo.Abp.Identity.Web", "src\Volo.Abp.Identity.Web\Volo.Abp.Identity.Web.xproj", "{17B14A48-5248-4F4C-A8E6-6926AA94EB7C}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -244,6 +246,10 @@ Global
{00B240B6-EC44-461A-9578-EF4F1BE9C688}.Debug|Any CPU.Build.0 = Debug|Any CPU {00B240B6-EC44-461A-9578-EF4F1BE9C688}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00B240B6-EC44-461A-9578-EF4F1BE9C688}.Release|Any CPU.ActiveCfg = Release|Any CPU {00B240B6-EC44-461A-9578-EF4F1BE9C688}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00B240B6-EC44-461A-9578-EF4F1BE9C688}.Release|Any CPU.Build.0 = Release|Any CPU {00B240B6-EC44-461A-9578-EF4F1BE9C688}.Release|Any CPU.Build.0 = Release|Any CPU
{17B14A48-5248-4F4C-A8E6-6926AA94EB7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17B14A48-5248-4F4C-A8E6-6926AA94EB7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17B14A48-5248-4F4C-A8E6-6926AA94EB7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17B14A48-5248-4F4C-A8E6-6926AA94EB7C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -291,5 +297,6 @@ Global
{57FCA6CB-9D99-411E-8ABF-20ACFBD61D61} = {1895A5C9-50D4-4568-9A3A-14657E615A5E} {57FCA6CB-9D99-411E-8ABF-20ACFBD61D61} = {1895A5C9-50D4-4568-9A3A-14657E615A5E}
{EB902D57-C047-4CDF-828B-FDC204AC7398} = {1895A5C9-50D4-4568-9A3A-14657E615A5E} {EB902D57-C047-4CDF-828B-FDC204AC7398} = {1895A5C9-50D4-4568-9A3A-14657E615A5E}
{00B240B6-EC44-461A-9578-EF4F1BE9C688} = {1895A5C9-50D4-4568-9A3A-14657E615A5E} {00B240B6-EC44-461A-9578-EF4F1BE9C688} = {1895A5C9-50D4-4568-9A3A-14657E615A5E}
{17B14A48-5248-4F4C-A8E6-6926AA94EB7C} = {1895A5C9-50D4-4568-9A3A-14657E615A5E}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

4
src/AbpDesk/AbpDesk.Web.Mvc/AbpDeskWebMvcModule.cs

@ -10,6 +10,7 @@ using Volo.Abp.AspNetCore.EmbeddedFiles;
using Volo.Abp.AspNetCore.Modularity; using Volo.Abp.AspNetCore.Modularity;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap; using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
using Volo.Abp.Identity; using Volo.Abp.Identity;
using Volo.Abp.Identity.Web;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
using Volo.Abp.UI.Navigation; using Volo.Abp.UI.Navigation;
@ -20,7 +21,8 @@ namespace AbpDesk.Web.Mvc
typeof(AbpAspNetCoreMvcUiBootstrapModule), typeof(AbpAspNetCoreMvcUiBootstrapModule),
typeof(AbpDeskApplicationModule), typeof(AbpDeskApplicationModule),
typeof(AbpDeskEntityFrameworkCoreModule), typeof(AbpDeskEntityFrameworkCoreModule),
typeof(AbpIdentityHttpProxyModule) typeof(AbpIdentityHttpProxyModule),
typeof(AbpIdentityWebModule)
)] )]
public class AbpDeskWebMvcModule : AbpModule public class AbpDeskWebMvcModule : AbpModule
{ {

8
src/AbpDesk/AbpDesk.Web.Mvc/Navigation/MainMenuContributor.cs

@ -14,13 +14,9 @@ namespace AbpDesk.Web.Mvc.Navigation
context.Menu.DisplayName = "Main Menu"; context.Menu.DisplayName = "Main Menu";
context.Menu.Items.Insert(0, new ApplicationMenuItem("Home", "Home", url: "/"));
context.Menu context.Menu
.AddItem(
new ApplicationMenuItem("Home", "Home", url: "/")
)
.AddItem(
new ApplicationMenuItem("Users", "Users", url: "/Users")
)
.AddItem( .AddItem(
new ApplicationMenuItem("TicketManagement", "Ticket Management") new ApplicationMenuItem("TicketManagement", "Ticket Management")
.AddItem( .AddItem(

3
src/AbpDesk/AbpDesk.Web.Mvc/project.json

@ -26,7 +26,8 @@
"AbpDesk.Application": "1.0.0-*", "AbpDesk.Application": "1.0.0-*",
"Volo.Abp.AspNetCore.Mvc.UI.Bootstrap": "1.0.0-*", "Volo.Abp.AspNetCore.Mvc.UI.Bootstrap": "1.0.0-*",
"Volo.Abp.AspNetCore.EmbeddedFiles": "1.0.0-*", "Volo.Abp.AspNetCore.EmbeddedFiles": "1.0.0-*",
"Volo.Abp.Identity.HttpProxy": "1.0.0-*" "Volo.Abp.Identity.HttpProxy": "1.0.0-*",
"Volo.Abp.Identity.Web": "1.0.0-*"
}, },
"tools": { "tools": {

1
src/Volo.Abp.Identity.HttpProxy/Volo/Abp/Identity/AbpIdentityHttpProxyModule.cs

@ -3,6 +3,7 @@ using Volo.Abp.Modularity;
namespace Volo.Abp.Identity namespace Volo.Abp.Identity
{ {
//TODO: Rename to Volo.Abp.Identity.HttpApi.Client / AbpIdentityHttpApiClientModule
[DependsOn(typeof(AbpIdentityApplicationContractsModule))] [DependsOn(typeof(AbpIdentityApplicationContractsModule))]
public class AbpIdentityHttpProxyModule : AbpModule public class AbpIdentityHttpProxyModule : AbpModule
{ {

24
src/Volo.Abp.Identity.Web/AbpIdentityWebMainMenuContributor.cs

@ -0,0 +1,24 @@
using System.Threading.Tasks;
using Volo.Abp.UI.Navigation;
namespace Volo.Abp.Identity.Web
{
public class AbpIdentityWebMainMenuContributor : IMenuContributor
{
public Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name != StandardMenus.Main)
{
return Task.CompletedTask;
}
context.Menu
.AddItem(
new ApplicationMenuItem("Identity", "Identity")
.AddItem(new ApplicationMenuItem("Users", "Users", url: "/Users"))
);
return Task.CompletedTask;
}
}
}

34
src/Volo.Abp.Identity.Web/AbpIdentityWebModule.cs

@ -0,0 +1,34 @@
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.EmbeddedFiles;
using Volo.Abp.Modularity;
using Volo.Abp.UI.Navigation;
namespace Volo.Abp.Identity.Web
{
[DependsOn(typeof(AbpAspNetCoreMvcModule), typeof(AbpIdentityApplicationContractsModule))]
public class AbpIdentityWebModule : AbpModule
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddAssemblyOf<AbpIdentityWebModule>();
services.Configure<NavigationOptions>(options =>
{
options.MenuContributors.Add(new AbpIdentityWebMainMenuContributor());
});
services.Configure<EmbeddedFileOptions>(options =>
{
options.Sources.Add(
new EmbeddedFileSet(
"/Views/",
GetType().GetTypeInfo().Assembly,
"Volo.Abp.Identity.Web.Views"
)
);
});
}
}
}

5
src/AbpDesk/AbpDesk.Web.Mvc/Controllers/UsersController.cs → src/Volo.Abp.Identity.Web/Controllers/UsersController.cs

@ -1,11 +1,10 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Identity;
namespace AbpDesk.Web.Mvc.Controllers namespace Volo.Abp.Identity.Web.Controllers
{ {
//TODO: Move to Volo.Abp.Identity.AspNetCore.Mvc or a similar module as a seperated area! //TODO: to a seperated area, named Identity!
public class UsersController : AbpController public class UsersController : AbpController
{ {
private readonly IUserAppService _userAppService; private readonly IUserAppService _userAppService;

27
src/Volo.Abp.Identity.Web/Properties/launchSettings.json

@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:49677/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Volo.Abp.Identity.Web": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

0
src/AbpDesk/AbpDesk.Web.Mvc/Views/Users/Index.cshtml → src/Volo.Abp.Identity.Web/Views/Users/Index.cshtml

25
src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.xproj

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>17b14a48-5248-4f4c-a8e6-6926aa94eb7c</ProjectGuid>
<RootNamespace>Volo.Abp.Identity.Web</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<DnxInvisibleContent Include="bower.json" />
<DnxInvisibleContent Include=".bowerrc" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

23
src/Volo.Abp.Identity.Web/project.json

@ -0,0 +1,23 @@
{
"dependencies": {
"Volo.Abp.AspNetCore.Mvc": "1.0.0-*",
"Volo.Abp.Identity.Application.Contracts": "1.0.0-*"
},
"tools": {
},
"frameworks": {
"netstandard1.6": {
"imports": "dnxcore50"
}
},
"buildOptions": {
"embed": {
"include": [
"Views/**/*.*"
]
}
}
}
Loading…
Cancel
Save