Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
IoTSharp
IoTSharp
提交
a851c433
IoTSharp
项目概览
IoTSharp
/
IoTSharp
9 个月 前同步成功
通知
15
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
IoTSharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a851c433
编写于
6月 13, 2019
作者:
麦壳饼
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify for register.vue and login/index.vue
上级
4bc3ae9a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
7 deletion
+16
-7
IoTSharp/Controllers/AccountController.cs
IoTSharp/Controllers/AccountController.cs
+4
-3
IoTSharp/Dtos/UserInfoDto.cs
IoTSharp/Dtos/UserInfoDto.cs
+1
-0
IoTSharp/IoTSharp.csproj
IoTSharp/IoTSharp.csproj
+11
-4
未找到文件。
IoTSharp/Controllers/AccountController.cs
浏览文件 @
a851c433
...
...
@@ -49,18 +49,19 @@ namespace IoTSharp.Controllers
{
string
custid
=
_signInManager
.
Context
.
User
.
FindFirstValue
(
IoTSharpClaimTypes
.
Customer
);
var
user
=
await
_userManager
.
GetUserAsync
(
_signInManager
.
Context
.
User
);
var
Customer
=
_context
.
Customer
.
FirstOrDefault
(
c
=>
c
.
Id
.
ToString
()
==
custid
);
var
Customer
=
_context
.
Customer
.
Include
(
c
=>
c
.
Tenant
).
FirstOrDefault
(
c
=>
c
.
Id
.
ToString
()
==
custid
);
var
rooles
=
await
_userManager
.
GetRolesAsync
(
user
);
var
uidto
=
new
UserInfoDto
()
{
Code
=
ApiCode
.
OK
,
Roles
=
string
.
Join
(
','
,
rooles
).
ToLower
().
Contains
(
"admin"
)?
"admin"
:
"editor
"
,
//TODO: Permission control
Roles
=
string
.
Join
(
','
,
rooles
).
ToLower
().
Contains
(
"admin"
)?
"admin"
:
"admin
"
,
//TODO: Permission control
Name
=
user
.
UserName
,
Email
=
user
.
Email
,
Avatar
=
user
.
Gravatar
(),
Introduction
=
user
.
NormalizedUserName
,
Customer
=
Customer
,
Tenant
=
Customer
.
Tenant
Tenant
=
Customer
?
.
Tenant
};
return
new
ApiResult
<
UserInfoDto
>(
ApiCode
.
Success
,
"OK"
,
uidto
);
}
...
...
IoTSharp/Dtos/UserInfoDto.cs
浏览文件 @
a851c433
...
...
@@ -15,5 +15,6 @@ namespace IoTSharp.Dtos
public
string
Introduction
{
get
;
set
;
}
public
Customer
Customer
{
get
;
set
;
}
public
Tenant
Tenant
{
get
;
set
;
}
public
string
Email
{
get
;
set
;
}
}
}
\ No newline at end of file
IoTSharp/IoTSharp.csproj
浏览文件 @
a851c433
...
...
@@ -11,11 +11,9 @@
<Product>IoTSharp</Product>
<Authors>IoT#</Authors>
<PackageProjectUrl>https://github.com/IoTSharp/IoTSharp</PackageProjectUrl>
<PackageLicenseUrl>
https://github.com/IoTSharp/IoTSharp/blob/master/LICENSE
</PackageLicenseUrl>
<PackageLicenseUrl></PackageLicenseUrl>
<RepositoryUrl>https://github.com/IoTSharp/IoTSharp</RepositoryUrl>
<PackageReleaseNotes>
Open-source IoT Platform - Device management, data collection, processing and visualization. https://www.iotsharp.net
</PackageReleaseNotes>
<PackageReleaseNotes>Open-source IoT Platform - Device management, data collection, processing and visualization. https://www.iotsharp.net</PackageReleaseNotes>
<Description>Open-source IoT Platform - Device management, data collection, processing and visualization.</Description>
<PackageId>IoTSharp</PackageId>
<UserSecretsId>18970590-05bf-4a1f-a70b-3c8a120d12cb</UserSecretsId>
...
...
@@ -27,6 +25,11 @@
<!-- Set this to true if you enable server-side prerendering -->
<BuildServerSideRenderer>false</BuildServerSideRenderer>
<Version>0.1.99</Version>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<RepositoryType>git</RepositoryType>
<PackageTags>IoT</PackageTags>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/44353254?s=200&v=4</PackageIconUrl>
</PropertyGroup>
<ItemGroup>
<Content Update="appsettings.json">
...
...
@@ -55,6 +58,10 @@
<Content Remove="Migrations\**" />
<EmbeddedResource Remove="Migrations\**" />
<None Remove="Migrations\**" />
<None Include="..\LICENSE.txt">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Changwei.AspNetCore.SpaServices.Extensions.VueCli" Version="1.0.0" />
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录