Commit 679281f321f84c72d88cb252d1d4b0486ad2b5e2

Authored by 王大哥
2 parents 515fceeb 7cb07aab

Merge branch 'main' into 'Framework'

Update default admin username from 'cc' to 'admin' across multiple files and adj…

…ust related documentation and seed data accordingly.

See merge request !1
README.md
@@ -77,7 +77,7 @@ cd Yi @@ -77,7 +77,7 @@ cd Yi
77 77
78 启动成功后,浏览器会自动打开 Swagger 文档:`http://localhost:19001/swagger` 78 启动成功后,浏览器会自动打开 Swagger 文档:`http://localhost:19001/swagger`
79 79
80 -**默认管理员账号**:`cc` / `123456` 80 +**默认管理员账号**:`admin` / `123456`
81 81
82 > 💡 **提示**: 82 > 💡 **提示**:
83 > - 首次启动会自动创建数据库表(CodeFirst) 83 > - 首次启动会自动创建数据库表(CodeFirst)
@@ -559,7 +559,7 @@ A: 设置 `EnabledSaasMultiTenancy: true`,并在 Swagger 中使用 `__tenant` @@ -559,7 +559,7 @@ A: 设置 `EnabledSaasMultiTenancy: true`,并在 Swagger 中使用 `__tenant`
559 ## 📞 联系我们 559 ## 📞 联系我们
560 560
561 - **官网**:[ccnetcore.com](https://ccnetcore.com) 561 - **官网**:[ccnetcore.com](https://ccnetcore.com)
562 -- **演示地址**:[data.ccnetcore.com:2000](https://data.ccnetcore.com:2000)(账号:cc / 密码:123456) 562 +- **演示地址**:[data.ccnetcore.com:2000](https://data.ccnetcore.com:2000)(账号:admin / 密码:123456)
563 - **QQ 群**:981136525(官方五群) 563 - **QQ 群**:981136525(官方五群)
564 - **微信**:添加 `chengzilaoge520`(备注:拉群) 564 - **微信**:添加 `chengzilaoge520`(备注:拉群)
565 565
Yi.Abp.Net8/client/Yi.Abp.Client.Console/Program.cs
1 -using Microsoft.Extensions.DependencyInjection; 1 +using Microsoft.Extensions.DependencyInjection;
2 using Microsoft.Extensions.Hosting; 2 using Microsoft.Extensions.Hosting;
3 using Yi.Abp.Client.Console; 3 using Yi.Abp.Client.Console;
4 using Yi.Framework.Rbac.Application.Contracts.IServices; 4 using Yi.Framework.Rbac.Application.Contracts.IServices;
@@ -20,7 +20,7 @@ try @@ -20,7 +20,7 @@ try
20 var data1 = await account.GetCaptchaImageAsync(); 20 var data1 = await account.GetCaptchaImageAsync();
21 21
22 //登录 22 //登录
23 - var data2 = await account.PostLoginAsync(new Yi.Framework.Rbac.Application.Contracts.Dtos.Account.LoginInputVo { UserName = "cc", Password = "123456", Code = string.Empty, Uuid = string.Empty }); 23 + var data2 = await account.PostLoginAsync(new Yi.Framework.Rbac.Application.Contracts.Dtos.Account.LoginInputVo { UserName = "admin", Password = "123456", Code = string.Empty, Uuid = string.Empty });
24 24
25 25
26 host.Run(); 26 host.Run();
Yi.Abp.Net8/framework/Yi.Framework.BackgroundWorkers.Hangfire/YiTokenAuthorizationFilter.cs
1 -using Hangfire.Dashboard; 1 +using Hangfire.Dashboard;
2 using Microsoft.AspNetCore.Http; 2 using Microsoft.AspNetCore.Http;
3 using Microsoft.Extensions.DependencyInjection; 3 using Microsoft.Extensions.DependencyInjection;
4 using Volo.Abp.DependencyInjection; 4 using Volo.Abp.DependencyInjection;
@@ -16,7 +16,7 @@ public sealed class YiTokenAuthorizationFilter : IDashboardAsyncAuthorizationFil @@ -16,7 +16,7 @@ public sealed class YiTokenAuthorizationFilter : IDashboardAsyncAuthorizationFil
16 private const string HtmlContentType = "text/html"; 16 private const string HtmlContentType = "text/html";
17 17
18 private readonly IServiceProvider _serviceProvider; 18 private readonly IServiceProvider _serviceProvider;
19 - private string _requiredUsername = "cc"; 19 + private string _requiredUsername = "admin";
20 private TimeSpan _tokenExpiration = TimeSpan.FromMinutes(10); 20 private TimeSpan _tokenExpiration = TimeSpan.FromMinutes(10);
21 21
22 /// <summary> 22 /// <summary>
Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain.Shared/Consts/UserConst.cs
@@ -24,7 +24,7 @@ namespace Yi.Framework.Rbac.Domain.Shared.Consts @@ -24,7 +24,7 @@ namespace Yi.Framework.Rbac.Domain.Shared.Consts
24 public const string Phone_Repeat = "手机号已重复"; 24 public const string Phone_Repeat = "手机号已重复";
25 25
26 //子租户管理员 26 //子租户管理员
27 - public const string Admin = "cc"; 27 + public const string Admin = "admin";
28 public const string AdminRolesCode = "admin"; 28 public const string AdminRolesCode = "admin";
29 public const string AdminPermissionCode = "*:*:*"; 29 public const string AdminPermissionCode = "*:*:*";
30 30
Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.SqlSugarCore/DataSeeds/UserDataSeed.cs
1 -using Microsoft.Extensions.Options; 1 +using Microsoft.Extensions.Options;
2 using Volo.Abp.Data; 2 using Volo.Abp.Data;
3 using Volo.Abp.DependencyInjection; 3 using Volo.Abp.DependencyInjection;
4 using Yi.Framework.Rbac.Domain.Entities; 4 using Yi.Framework.Rbac.Domain.Entities;
@@ -25,18 +25,18 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds @@ -25,18 +25,18 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
25 var entities = new List<UserAggregateRoot>(); 25 var entities = new List<UserAggregateRoot>();
26 UserAggregateRoot user1 = new UserAggregateRoot() 26 UserAggregateRoot user1 = new UserAggregateRoot()
27 { 27 {
28 - Name = "大橙子",  
29 - UserName = "cc",  
30 - Nick = "橙子", 28 + Name = "超级管理员",
  29 + UserName = "admin",
  30 + Nick = "超级管理员",
31 EncryPassword = new EncryPasswordValueObject(_options.AdminPassword), 31 EncryPassword = new EncryPasswordValueObject(_options.AdminPassword),
32 - Email = "454313500@qq.com", 32 + Email = "admin@example.com",
33 Phone = 13800000000, 33 Phone = 13800000000,
34 Sex = SexEnum.Male, 34 Sex = SexEnum.Male,
35 - Address = "深圳", 35 + Address = "成都",
36 Age = 20, 36 Age = 20,
37 - Introduction = "还有谁?", 37 + Introduction = "超级管理员",
38 OrderNum = 999, 38 OrderNum = 999,
39 - Remark = "描述是什么呢?", 39 + Remark = "超级管理员",
40 State = true 40 State = true
41 }; 41 };
42 user1.BuildPassword(); 42 user1.BuildPassword();
@@ -45,18 +45,18 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds @@ -45,18 +45,18 @@ namespace Yi.Framework.Rbac.SqlSugarCore.DataSeeds
45 UserAggregateRoot user2 = new UserAggregateRoot() 45 UserAggregateRoot user2 = new UserAggregateRoot()
46 { 46 {
47 47
48 - Name = "测试", 48 + Name = "测试",
49 UserName = "test", 49 UserName = "test",
50 Nick = "测试", 50 Nick = "测试",
51 - EncryPassword=new EncryPasswordValueObject("123456"),  
52 - Email = "454313500@qq.com", 51 + EncryPassword=new EncryPasswordValueObject(_options.AdminPassword),
  52 + Email = "test@example.com",
53 Phone = 15900000000, 53 Phone = 15900000000,
54 Sex = SexEnum.Woman, 54 Sex = SexEnum.Woman,
55 - Address = "深圳", 55 + Address = "成都",
56 Age = 18, 56 Age = 18,
57 - Introduction = "还有我!", 57 + Introduction = "测试",
58 OrderNum = 1, 58 OrderNum = 1,
59 - Remark = "我没有描述!", 59 + Remark = "测试",
60 State = true 60 State = true
61 61
62 }; 62 };
Yi.Abp.Net8/src/Yi.Abp.Application/Services/TestService.cs
@@ -276,7 +276,7 @@ namespace Yi.Abp.Application.Services @@ -276,7 +276,7 @@ namespace Yi.Abp.Application.Services
276 try 276 try
277 { 277 {
278 await DataSeeder.SeedAsync(); 278 await DataSeeder.SeedAsync();
279 - return "种子数据初始化成功!默认管理员账号:cc / 123456"; 279 + return "种子数据初始化成功!默认管理员账号:admin / 123456";
280 } 280 }
281 catch (Exception ex) 281 catch (Exception ex)
282 { 282 {
Yi.Doc.Md/01.框架快速开始教程/03.如何启动.md
@@ -22,7 +22,7 @@ vs选中启动项目Yi.Abp.Web模板项目 @@ -22,7 +22,7 @@ vs选中启动项目Yi.Abp.Web模板项目
22 22
23 > 等等?表结构呢?表数据呢?为什么没有sql文件?在这里,统统不需要,配置文件默认开启CodeFirst可自动建库及表结构,默认开启DataSeed种子数据,自动创建初始化数据 23 > 等等?表结构呢?表数据呢?为什么没有sql文件?在这里,统统不需要,配置文件默认开启CodeFirst可自动建库及表结构,默认开启DataSeed种子数据,自动创建初始化数据
24 24
25 -默认种子数据超级管理员账号:cc / 123456 25 +默认种子数据超级管理员账号:admin / 123456
26 26
27 ## 前端 27 ## 前端
28 对于前端,默认提供两个项目,分别对应后端的BBS与RBAC 28 对于前端,默认提供两个项目,分别对应后端的BBS与RBAC