Skip to content

Commit

Permalink
Upgraded to ABP 0.10.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
hikalkan committed Jul 20, 2016
1 parent fe105b4 commit 9b413aa
Show file tree
Hide file tree
Showing 43 changed files with 1,625 additions and 351 deletions.
Expand Up @@ -9,10 +9,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ModuleZeroSampleProject</RootNamespace>
<AssemblyName>ModuleZeroSampleProject.Application</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -32,20 +33,24 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Abp, Version=0.7.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.0.7.3.0\lib\net451\Abp.dll</HintPath>
<Reference Include="Abp, Version=0.10.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.0.10.1.0\lib\net452\Abp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Abp.AutoMapper, Version=0.7.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.AutoMapper.0.7.2.0\lib\net451\Abp.AutoMapper.dll</HintPath>
<Reference Include="Abp.AutoMapper, Version=0.10.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.AutoMapper.0.10.1.0\lib\net452\Abp.AutoMapper.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Abp.EntityFramework, Version=0.7.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.EntityFramework.0.7.2.0\lib\net451\Abp.EntityFramework.dll</HintPath>
<Reference Include="Abp.EntityFramework, Version=0.10.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.EntityFramework.0.10.1.0\lib\net452\Abp.EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Abp.Zero, Version=0.7.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.Zero.0.7.3.0\lib\net451\Abp.Zero.dll</HintPath>
<Reference Include="Abp.EntityFramework.Common, Version=0.10.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.EntityFramework.Common.0.10.1.0\lib\net452\Abp.EntityFramework.Common.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Abp.Zero, Version=0.10.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.Zero.0.10.1.0\lib\net452\Abp.Zero.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="AutoMapper, Version=3.3.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
Expand All @@ -72,8 +77,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.DynamicFilters, Version=1.4.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.DynamicFilters.1.4.1\lib\net40\EntityFramework.DynamicFilters.dll</HintPath>
<Reference Include="EntityFramework.DynamicFilters, Version=1.4.11.0, Culture=neutral, PublicKeyToken=146423a1b8d60775, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.DynamicFilters.1.4.11\lib\net40\EntityFramework.DynamicFilters.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
Expand All @@ -84,8 +89,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Nito.AsyncEx, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
Expand All @@ -101,16 +106,19 @@
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.0.34.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.Bcl.Immutable.1.0.34\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
<Reference Include="System.Collections.Immutable, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Linq.Dynamic, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.Linq.Dynamic.1.0.4\lib\net40\System.Linq.Dynamic.dll</HintPath>
<Reference Include="System.Linq.Dynamic, Version=1.0.5840.25917, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\System.Linq.Dynamic.1.0.6\lib\net40\System.Linq.Dynamic.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Caching" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down
18 changes: 9 additions & 9 deletions src/ModuleZeroSampleProject.Application/app.config
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.34.0" newVersion="1.0.34.0" />
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-1.0.34.0" newVersion="1.0.34.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.3.0.0" newVersion="3.3.0.0" />
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.3.0.0" newVersion="3.3.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
</providers>
</entityFramework>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>
16 changes: 9 additions & 7 deletions src/ModuleZeroSampleProject.Application/packages.config
@@ -1,18 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Abp" version="0.7.3.0" targetFramework="net451" />
<package id="Abp.AutoMapper" version="0.7.2.0" targetFramework="net451" />
<package id="Abp.EntityFramework" version="0.7.2.0" targetFramework="net451" />
<package id="Abp.Zero" version="0.7.3.0" targetFramework="net451" />
<package id="Abp" version="0.10.1.0" targetFramework="net452" />
<package id="Abp.AutoMapper" version="0.10.1.0" targetFramework="net452" />
<package id="Abp.EntityFramework" version="0.10.1.0" targetFramework="net452" />
<package id="Abp.EntityFramework.Common" version="0.10.1.0" targetFramework="net452" />
<package id="Abp.Zero" version="0.10.1.0" targetFramework="net452" />
<package id="AutoMapper" version="3.3.1" targetFramework="net451" />
<package id="Castle.Core" version="3.3.3" targetFramework="net451" />
<package id="Castle.LoggingFacility" version="3.3.0" targetFramework="net451" />
<package id="Castle.Windsor" version="3.3.0" targetFramework="net451" />
<package id="EntityFramework" version="6.1.3" targetFramework="net451" />
<package id="EntityFramework.DynamicFilters" version="1.4.1" targetFramework="net451" />
<package id="EntityFramework.DynamicFilters" version="1.4.11" targetFramework="net452" />
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net451" />
<package id="Microsoft.Bcl.Immutable" version="1.0.34" targetFramework="net451" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net451" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
<package id="Nito.AsyncEx" version="3.0.1" targetFramework="net451" />
<package id="System.Linq.Dynamic" version="1.0.4" targetFramework="net451" />
<package id="System.Collections.Immutable" version="1.2.0" targetFramework="net452" />
<package id="System.Linq.Dynamic" version="1.0.6" targetFramework="net452" />
</packages>
Expand Up @@ -9,6 +9,7 @@ public class PermissionChecker : PermissionChecker<Tenant, Role, User>
public PermissionChecker(UserManager userManager)
: base(userManager)
{

}
}
}
3 changes: 1 addition & 2 deletions src/ModuleZeroSampleProject.Core/Authorization/Role.cs
@@ -1,10 +1,9 @@
using Abp.Authorization.Roles;
using ModuleZeroSampleProject.MultiTenancy;
using ModuleZeroSampleProject.Users;

namespace ModuleZeroSampleProject.Authorization
{
public class Role : AbpRole<Tenant, User>
public class Role : AbpRole<User>
{
public Role()
{
Expand Down
20 changes: 11 additions & 9 deletions src/ModuleZeroSampleProject.Core/Authorization/RoleManager.cs
@@ -1,24 +1,26 @@
using Abp.Authorization;
using Abp.Authorization.Roles;
using Abp.Domain.Uow;
using Abp.Runtime.Caching;
using Abp.Zero.Configuration;
using ModuleZeroSampleProject.MultiTenancy;
using ModuleZeroSampleProject.Users;

namespace ModuleZeroSampleProject.Authorization
{
public class RoleManager : AbpRoleManager<Tenant, Role, User>
public class RoleManager : AbpRoleManager<Role, User>
{
public RoleManager(
RoleStore roleStore,
IPermissionManager permissionManager,
IRoleManagementConfig roleManagementConfig,
ICacheManager cacheManager)
RoleStore store,
IPermissionManager permissionManager,
IRoleManagementConfig roleManagementConfig,
ICacheManager cacheManager,
IUnitOfWorkManager unitOfWorkManager)
: base(
roleStore,
permissionManager,
store,
permissionManager,
roleManagementConfig,
cacheManager)
cacheManager,
unitOfWorkManager)
{
}
}
Expand Down
18 changes: 7 additions & 11 deletions src/ModuleZeroSampleProject.Core/Authorization/RoleStore.cs
@@ -1,24 +1,20 @@
using Abp.Authorization.Roles;
using Abp.Authorization.Users;
using Abp.Domain.Repositories;
using Abp.Runtime.Caching;
using ModuleZeroSampleProject.MultiTenancy;
using ModuleZeroSampleProject.Users;

namespace ModuleZeroSampleProject.Authorization
{
public class RoleStore : AbpRoleStore<Tenant, Role, User>
public class RoleStore : AbpRoleStore<Role, User>
{
public RoleStore(
IRepository<Role> roleRepository,
IRepository<UserRole, long> userRoleRepository,
IRepository<RolePermissionSetting, long> rolePermissionSettingRepository,
ICacheManager cacheManager)
IRepository<Role> roleRepository,
IRepository<UserRole, long> userRoleRepository,
IRepository<RolePermissionSetting, long> rolePermissionSettingRepository)
: base(
roleRepository,
userRoleRepository,
rolePermissionSettingRepository,
cacheManager)
roleRepository,
userRoleRepository,
rolePermissionSettingRepository)
{
}
}
Expand Down
Expand Up @@ -9,10 +9,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ModuleZeroSampleProject</RootNamespace>
<AssemblyName>ModuleZeroSampleProject.Core</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -32,12 +33,12 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Abp, Version=0.7.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.0.7.3.0\lib\net451\Abp.dll</HintPath>
<Reference Include="Abp, Version=0.10.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.0.10.1.0\lib\net452\Abp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Abp.Zero, Version=0.7.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.Zero.0.7.3.0\lib\net451\Abp.Zero.dll</HintPath>
<Reference Include="Abp.Zero, Version=0.10.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Abp.Zero.0.10.1.0\lib\net452\Abp.Zero.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
Expand All @@ -56,8 +57,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Nito.AsyncEx, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
Expand All @@ -73,12 +74,15 @@
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.0.34.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.Bcl.Immutable.1.0.34\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
<Reference Include="System.Collections.Immutable, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Caching" />
<Reference Include="System.Transactions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand Down
2 changes: 1 addition & 1 deletion src/ModuleZeroSampleProject.Core/MultiTenancy/Tenant.cs
Expand Up @@ -3,7 +3,7 @@

namespace ModuleZeroSampleProject.MultiTenancy
{
public class Tenant : AbpTenant<Tenant, User>
public class Tenant : AbpTenant<User>
{
protected Tenant()
{
Expand Down
3 changes: 1 addition & 2 deletions src/ModuleZeroSampleProject.Core/Users/User.cs
@@ -1,9 +1,8 @@
using Abp.Authorization.Users;
using ModuleZeroSampleProject.MultiTenancy;

namespace ModuleZeroSampleProject.Users
{
public class User : AbpUser<Tenant, User>
public class User : AbpUser<User>
{
public override string ToString()
{
Expand Down
47 changes: 29 additions & 18 deletions src/ModuleZeroSampleProject.Core/Users/UserManager.cs
Expand Up @@ -5,6 +5,8 @@
using Abp.Dependency;
using Abp.Domain.Repositories;
using Abp.Domain.Uow;
using Abp.Organizations;
using Abp.Runtime.Caching;
using Abp.Zero.Configuration;
using ModuleZeroSampleProject.Authorization;
using ModuleZeroSampleProject.MultiTenancy;
Expand All @@ -14,27 +16,36 @@ namespace ModuleZeroSampleProject.Users
public class UserManager : AbpUserManager<Tenant, Role, User>
{
public UserManager(
UserStore userStore,
RoleManager roleManager,
IRepository<Tenant> tenantRepository,
IMultiTenancyConfig multiTenancyConfig,
IPermissionManager permissionManager,
IUnitOfWorkManager unitOfWorkManager,
ISettingManager settingManager,
IUserManagementConfig userManagementConfig,
UserStore store,
RoleManager roleManager,
IRepository<Tenant> tenantRepository,
IMultiTenancyConfig multiTenancyConfig,
IPermissionManager permissionManager,
IUnitOfWorkManager unitOfWorkManager,
ISettingManager settingManager,
IUserManagementConfig userManagementConfig,
IIocResolver iocResolver,
Abp.Runtime.Caching.ICacheManager cacheManager)
ICacheManager cacheManager,
IRepository<OrganizationUnit, long> organizationUnitRepository,
IRepository<UserOrganizationUnit, long> userOrganizationUnitRepository,
IOrganizationUnitSettings organizationUnitSettings,
IRepository<UserLoginAttempt, long> userLoginAttemptRepository)
: base(
userStore,
roleManager,
tenantRepository,
multiTenancyConfig,
permissionManager,
unitOfWorkManager,
settingManager,
userManagementConfig,
store,
roleManager,
tenantRepository,
multiTenancyConfig,
permissionManager,
unitOfWorkManager,
settingManager,
userManagementConfig,
iocResolver,
cacheManager)
cacheManager,
organizationUnitRepository,
userOrganizationUnitRepository,
organizationUnitSettings,
userLoginAttemptRepository
)
{
}
}
Expand Down

0 comments on commit 9b413aa

Please sign in to comment.