Merge remote-tracking branch 'origin/main'
# Conflicts: # api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json
This commit is contained in:
commit
7986f6eec1
13 changed files with 1328 additions and 521 deletions
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
|
||||
namespace Kurs.Platform.Identity.Dto;
|
||||
|
||||
public class AssignedClaimViewModel
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string ClaimType { get; set; }
|
||||
|
||||
public string ClaimValue { get; set; }
|
||||
|
||||
public bool IsAssigned { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using Volo.Abp.ObjectExtending;
|
||||
|
||||
namespace Kurs.Platform.Identity.Dto;
|
||||
|
||||
public class UserClaimModel : ExtensibleObject
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public string ClaimType { get; set; }
|
||||
public string ClaimValue { get; set; }
|
||||
}
|
||||
|
|
@ -37,6 +37,8 @@ public class UserInfoViewModel: ExtensibleObject
|
|||
public AssignedRoleViewModel[] Roles { get; set; }
|
||||
|
||||
public AssignedBranchViewModel[] Branches { get; set; }
|
||||
|
||||
public AssignedClaimViewModel[] Claims { get; set; }
|
||||
|
||||
public bool LockUser { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Threading.Tasks;
|
||||
using Kurs.Platform.Entities;
|
||||
using Kurs.Platform.Extensions;
|
||||
using Kurs.Platform.Identity.Dto;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using Volo.Abp.Guids;
|
||||
using Volo.Abp.Identity;
|
||||
using Volo.Abp.PermissionManagement;
|
||||
|
||||
|
|
@ -21,6 +24,8 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
public IRepository<PermissionDefinitionRecord, Guid> permissionRepository { get; }
|
||||
public IRepository<Branch, Guid> branchRepository { get; }
|
||||
public IRepository<BranchUsers, Guid> branchUsersRepository { get; }
|
||||
public IRepository<IdentityClaimType, Guid> claimTypesRepository { get; }
|
||||
public IGuidGenerator guidGenerator { get; }
|
||||
public IdentityUserManager UserManager { get; set; }
|
||||
|
||||
public PlatformIdentityAppService(
|
||||
|
|
@ -28,7 +33,9 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
IIdentityUserRepository identityUserRepository,
|
||||
IRepository<PermissionDefinitionRecord, Guid> permissionRepository,
|
||||
IRepository<Branch, Guid> branchRepository,
|
||||
IRepository<BranchUsers, Guid> branchUsersRepository
|
||||
IRepository<BranchUsers, Guid> branchUsersRepository,
|
||||
IRepository<IdentityClaimType, Guid> claimTypesRepository,
|
||||
IGuidGenerator guidGenerator
|
||||
)
|
||||
{
|
||||
this.IdentityUserAppService = identityUserAppService;
|
||||
|
|
@ -36,6 +43,8 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
this.permissionRepository = permissionRepository;
|
||||
this.branchRepository = branchRepository;
|
||||
this.branchUsersRepository = branchUsersRepository;
|
||||
this.claimTypesRepository = claimTypesRepository;
|
||||
this.guidGenerator = guidGenerator;
|
||||
}
|
||||
|
||||
public async Task<UserInfoViewModel> GetByIdAsync(Guid UserId)
|
||||
|
|
@ -52,11 +61,12 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
}
|
||||
}
|
||||
|
||||
var query = await branchUsersRepository.GetQueryableAsync();
|
||||
var branchUsers = query.Where(a => a.UserId == UserId).Select(r => r.BranchId).ToList();
|
||||
var currentTenantId = CurrentTenant.Id.HasValue ? CurrentTenant.Id : null;
|
||||
|
||||
var branchList = await branchRepository.GetListAsync(a=> a.TenantId == currentTenantId);
|
||||
//Branch
|
||||
var queryBranch = await branchUsersRepository.GetQueryableAsync();
|
||||
var branchUsers = queryBranch.Where(a => a.UserId == UserId).Select(r => r.BranchId).ToList();
|
||||
var branchList = await branchRepository.GetListAsync(a => a.TenantId == currentTenantId);
|
||||
var branches = branchList.Select(branch => new AssignedBranchViewModel
|
||||
{
|
||||
Id = branch.Id,
|
||||
|
|
@ -65,6 +75,21 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
})
|
||||
.ToArray();
|
||||
|
||||
//Claim
|
||||
var claimUsers = user.Claims;
|
||||
var claimList = await claimTypesRepository.GetListAsync();
|
||||
var claims = claimList.Select(claim =>
|
||||
{
|
||||
var userClaim = claimUsers.FirstOrDefault(c => c.ClaimType == claim.Name);
|
||||
return new AssignedClaimViewModel
|
||||
{
|
||||
Id = userClaim?.Id ?? Guid.Empty,
|
||||
ClaimType = claim.Name,
|
||||
ClaimValue = userClaim?.ClaimValue,
|
||||
IsAssigned = userClaim != null
|
||||
};
|
||||
}).ToArray();
|
||||
|
||||
return new UserInfoViewModel()
|
||||
{
|
||||
Id = user.Id,
|
||||
|
|
@ -73,6 +98,7 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
Surname = user.Surname,
|
||||
Roles = roles,
|
||||
Branches = branches,
|
||||
Claims = claims,
|
||||
Email = user.Email,
|
||||
PhoneNumber = user.PhoneNumber,
|
||||
IsActive = user.IsActive,
|
||||
|
|
@ -177,4 +203,19 @@ public class PlatformIdentityAppService : ApplicationService
|
|||
|
||||
return [.. list.OrderBy(p => p.Name)];
|
||||
}
|
||||
|
||||
public async Task CreateClaimUserAsync(UserClaimModel input)
|
||||
{
|
||||
var user = await identityUserRepository.GetAsync(input.UserId);
|
||||
|
||||
user.AddClaim(guidGenerator, new Claim(input.ClaimType, input.ClaimValue));
|
||||
}
|
||||
|
||||
public async Task DeleteClaimUser(Guid id, Guid userId)
|
||||
{
|
||||
var user = await identityUserRepository.GetAsync(userId);
|
||||
var claim = user.Claims.FirstOrDefault(a => a.Id == id);
|
||||
|
||||
user.Claims.Remove(claim);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,347 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using Kurs.Languages.Languages;
|
||||
using Kurs.Platform.Entities;
|
||||
using Kurs.Platform.Enums;
|
||||
using Kurs.Platform.ListForms;
|
||||
using Kurs.Platform.Queries;
|
||||
using Volo.Abp.Data;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
using static Kurs.Platform.PlatformConsts;
|
||||
using AppCodes = Kurs.Platform.Data.Seeds.SeedConsts.AppCodes;
|
||||
|
||||
namespace Kurs.Platform.Data.Seeds;
|
||||
|
||||
public class FormSeeder : IDataSeedContributor, ITransientDependency
|
||||
{
|
||||
private readonly IRepository<ListForm, Guid> _listFormRepository;
|
||||
private readonly IRepository<ListFormField, Guid> _listFormFieldRepository;
|
||||
|
||||
public FormSeeder(
|
||||
IRepository<ListForm, Guid> listFormRepository,
|
||||
IRepository<ListFormField, Guid> listFormFieldRepository)
|
||||
{
|
||||
_listFormRepository = listFormRepository;
|
||||
_listFormFieldRepository = listFormFieldRepository;
|
||||
}
|
||||
|
||||
public async Task SeedAsync(DataSeedContext context)
|
||||
{
|
||||
if (await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Forms.FormLanguage))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#region Languages
|
||||
var formLanguage = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.Form,
|
||||
IsSubForm = false,
|
||||
SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Language Texts",
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = ListFormCodes.LanguageText,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
ParentFieldName = "CultureName",
|
||||
ChildFieldName = "CultureName"
|
||||
}
|
||||
}
|
||||
},
|
||||
new {
|
||||
TabTitle = "Form Sütun Sayıları",
|
||||
TabType = ListFormTabTypeEnum.Chart,
|
||||
Code = ChartCodes.Chart2,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
ParentFieldName = "ListFormCode",
|
||||
ChildFieldName = "ListFormCode"
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Forms.FormLanguage,
|
||||
Name = AppCodes.Languages.Language,
|
||||
Title = AppCodes.Languages.Language,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Languages.Language,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = DbTablePrefix + "Language",
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = "\"IsDeleted\" = 'false'",
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
D = AppCodes.Languages.Language + ".Delete",
|
||||
E = AppCodes.Languages.Language + ".Export"
|
||||
}),
|
||||
DeleteCommand = $"UPDATE \"{DbTablePrefix}Language\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
||||
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "DeleterId",
|
||||
FieldDbType = DbType.Guid,
|
||||
Value = "@USERID",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() {
|
||||
FieldName = "Id",
|
||||
FieldDbType = DbType.Guid,
|
||||
Value = "@ID",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||
}),
|
||||
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
|
||||
{
|
||||
AllowDeleting = true,
|
||||
AllowAdding = true,
|
||||
AllowUpdating = true,
|
||||
ConfirmDelete = true,
|
||||
}),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order = 1,
|
||||
ColCount = 1,
|
||||
ColSpan = 2,
|
||||
ItemType = "group",
|
||||
Items = [
|
||||
new() { Order = 1, DataField = "CultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new() { Order = 2, DataField = "UiCultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new() { Order = 3, DataField = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new() { Order = 4, DataField = "IsEnabled", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox },
|
||||
new() { Order = 5, DataField = "MultipleCultures", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTagBox },
|
||||
]
|
||||
}
|
||||
}),
|
||||
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "CreationTime",
|
||||
FieldDbType = DbType.DateTime,
|
||||
Value = "@NOW",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() {
|
||||
FieldName = "CreatorId",
|
||||
FieldDbType = DbType.Guid,
|
||||
Value = "@USERID",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() {
|
||||
FieldName = "IsDeleted",
|
||||
FieldDbType = DbType.Boolean,
|
||||
Value = "false",
|
||||
CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "IsEnabled",
|
||||
FieldDbType = DbType.Boolean,
|
||||
Value = "true",
|
||||
CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
})
|
||||
}
|
||||
);
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 0,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 0,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new() {
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "CultureName",
|
||||
Width = 150,
|
||||
ListOrderNo = 1,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)}
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "UiCultureName",
|
||||
Width = 150,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)}
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "DisplayName",
|
||||
Width = 150,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)}
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsEnabled",
|
||||
Width = 125,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.DateTime,
|
||||
FieldName = "CreationTime",
|
||||
Width = 125,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)}
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "MultipleCultures",
|
||||
Width = 250,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnFilterJson = JsonSerializer.Serialize(new ColumnFilterDto
|
||||
{
|
||||
AllowFiltering = true
|
||||
}),
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||
{
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = $"SELECT \"CultureName\" AS \"Key\", \"DisplayName\" AS \"Name\", \"CreationTime\" FROM \"{DbTablePrefix}Language\" WHERE \"IsEnabled\" = 'true' and \"IsDeleted\" = 'false'"
|
||||
|
||||
//TODO: Tasi grid editingform
|
||||
// EditorTemplateTagBox = new EditorTagBoxDto()
|
||||
// {
|
||||
// ApplyValueMode = "useButtons",
|
||||
// SearchEnabled = true,
|
||||
// MaxDisplayedTags = 3
|
||||
// }
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
]);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -65,6 +65,316 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
roleId = userRole.Result.Name.ToString();
|
||||
}
|
||||
|
||||
#region Form
|
||||
#region Languages
|
||||
var formLanguage = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.Form,
|
||||
IsSubForm = false,
|
||||
SubFormsJson = JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabTitle = "Language Texts",
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
Code = ListFormCodes.LanguageText,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
ParentFieldName = "CultureName",
|
||||
ChildFieldName = "CultureName"
|
||||
}
|
||||
}
|
||||
},
|
||||
new {
|
||||
TabTitle = "Form Sütun Sayıları",
|
||||
TabType = ListFormTabTypeEnum.Chart,
|
||||
Code = ChartCodes.Chart2,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
ParentFieldName = "ListFormCode",
|
||||
ChildFieldName = "ListFormCode"
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Forms.FormLanguage,
|
||||
Name = AppCodes.Languages.Language,
|
||||
Title = AppCodes.Languages.Language,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Languages.Language,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = DbTablePrefix + "Language",
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = "\"IsDeleted\" = 'false'",
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
D = AppCodes.Languages.Language + ".Delete",
|
||||
E = AppCodes.Languages.Language + ".Export"
|
||||
}),
|
||||
DeleteCommand = $"UPDATE \"{DbTablePrefix}Language\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
||||
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "DeleterId",
|
||||
FieldDbType = DbType.Guid,
|
||||
Value = "@USERID",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() {
|
||||
FieldName = "Id",
|
||||
FieldDbType = DbType.Guid,
|
||||
Value = "@ID",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||
}),
|
||||
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
|
||||
{
|
||||
AllowDeleting = true,
|
||||
AllowAdding = true,
|
||||
AllowUpdating = true,
|
||||
ConfirmDelete = true,
|
||||
}),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order = 1,
|
||||
ColCount = 1,
|
||||
ColSpan = 2,
|
||||
ItemType = "group",
|
||||
Items = [
|
||||
new() { Order = 1, DataField = "CultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new() { Order = 2, DataField = "UiCultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new() { Order = 3, DataField = "DisplayName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new() { Order = 4, DataField = "IsEnabled", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxCheckBox },
|
||||
new() { Order = 5, DataField = "MultipleCultures", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxTagBox },
|
||||
]
|
||||
}
|
||||
}),
|
||||
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "CreationTime",
|
||||
FieldDbType = DbType.DateTime,
|
||||
Value = "@NOW",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() {
|
||||
FieldName = "CreatorId",
|
||||
FieldDbType = DbType.Guid,
|
||||
Value = "@USERID",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() {
|
||||
FieldName = "IsDeleted",
|
||||
FieldDbType = DbType.Boolean,
|
||||
Value = "false",
|
||||
CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "IsEnabled",
|
||||
FieldDbType = DbType.Boolean,
|
||||
Value = "true",
|
||||
CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
})
|
||||
}
|
||||
);
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 0,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 0,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new() {
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "CultureName",
|
||||
Width = 150,
|
||||
ListOrderNo = 1,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)}
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "UiCultureName",
|
||||
Width = 150,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)}
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "DisplayName",
|
||||
Width = 150,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)}
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsEnabled",
|
||||
Width = 125,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.DateTime,
|
||||
FieldName = "CreationTime",
|
||||
Width = 125,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] {
|
||||
new() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)}
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
new()
|
||||
{
|
||||
ListFormCode = formLanguage.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "MultipleCultures",
|
||||
Width = 250,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnFilterJson = JsonSerializer.Serialize(new ColumnFilterDto
|
||||
{
|
||||
AllowFiltering = true
|
||||
}),
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||
{
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "Name",
|
||||
ValueExpr = "Key",
|
||||
LookupQuery = $"SELECT \"CultureName\" AS \"Key\", \"DisplayName\" AS \"Name\", \"CreationTime\" FROM \"{DbTablePrefix}Language\" WHERE \"IsEnabled\" = 'true' and \"IsDeleted\" = 'false'"
|
||||
|
||||
//TODO: Tasi grid editingform
|
||||
// EditorTemplateTagBox = new EditorTagBoxDto()
|
||||
// {
|
||||
// ApplyValueMode = "useButtons",
|
||||
// SearchEnabled = true,
|
||||
// MaxDisplayedTags = 3
|
||||
// }
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Languages.Language + ".Create",
|
||||
R = AppCodes.Languages.Language,
|
||||
U = AppCodes.Languages.Language + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
},
|
||||
]);
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region List
|
||||
#region Tenants
|
||||
var listFormTenants = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
|
|
@ -8204,5 +8514,371 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
]);
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region ClaimTypes
|
||||
var listFormClaimTypes = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.ClaimTypes,
|
||||
Name = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
Title = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = "AbpClaimTypes",
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto
|
||||
{
|
||||
Visible = true
|
||||
}),
|
||||
HeaderFilterJson = JsonSerializer.Serialize(new
|
||||
{
|
||||
Visible = true
|
||||
}),
|
||||
SearchPanelJson = JsonSerializer.Serialize(new
|
||||
{
|
||||
Visible = true
|
||||
}),
|
||||
GroupPanelJson = JsonSerializer.Serialize(new
|
||||
{
|
||||
Visible = true
|
||||
}),
|
||||
SelectionJson = JsonSerializer.Serialize(new SelectionDto
|
||||
{
|
||||
Mode = GridOptions.SelectionModeSingle,
|
||||
AllowSelectAll = false
|
||||
}),
|
||||
ColumnOptionJson = JsonSerializer.Serialize(new
|
||||
{
|
||||
ColumnFixingEnabled = true,
|
||||
ColumnChooserEnabled = true
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||
{
|
||||
C = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Create",
|
||||
R = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
U = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Update",
|
||||
D = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Delete",
|
||||
E = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Export"
|
||||
}),
|
||||
PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto
|
||||
{
|
||||
Visible = true,
|
||||
AllowedPageSizes = "10,20,50,100",
|
||||
ShowPageSizeSelector = true,
|
||||
ShowNavigationButtons = true,
|
||||
ShowInfo = false,
|
||||
InfoText = "Page {0} of {1} ({2} items)",
|
||||
DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive,
|
||||
ScrollingMode = GridColumnOptions.ScrollingModeStandard,
|
||||
LoadPanelEnabled = "auto",
|
||||
LoadPanelText = "Loading..."
|
||||
}),
|
||||
EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto
|
||||
{
|
||||
Popup = new GridEditingPopupDto()
|
||||
{
|
||||
Title = "Claim Types Form",
|
||||
Width = 500,
|
||||
Height = 550
|
||||
},
|
||||
AllowDeleting = true,
|
||||
AllowAdding = true,
|
||||
AllowUpdating = true,
|
||||
SendOnlyChangedFormValuesUpdate = false,
|
||||
}),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||
{
|
||||
new() { Order=1, ColCount=1, ColSpan=2, ItemType="group", Items =
|
||||
[
|
||||
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=2, DataField="ValueType", ColSpan=2, IsRequired=true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order=3, DataField="Required", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
|
||||
new EditingFormItemDto { Order=4, DataField="IsStatic", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxCheckBox },
|
||||
new EditingFormItemDto { Order=5, DataField="Regex", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=6, DataField="RegexDescription", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
new EditingFormItemDto { Order=7, DataField="Description", ColSpan=2, IsRequired=false, EditorType2=EditorTypes.dxTextBox, EditorOptions="{ \"showClearButton\" : true }" },
|
||||
]
|
||||
}
|
||||
}),
|
||||
DeleteCommand = "DELETE FROM \"AbpClaimTypes\" WHERE \"Id\"=@Id",
|
||||
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "Id",
|
||||
FieldDbType = DbType.Guid,
|
||||
Value = "@ID",
|
||||
CustomValueType = FieldCustomValueTypeEnum.CustomKey }
|
||||
}),
|
||||
InsertCommand = "INSERT INTO \"AbpClaimTypes\" (\"Id\",\"ValueType\",\"Required\",\"IsStatic\",\"Name\",\"ConcurrencyStamp\",\"ExtraProperties\") OUTPUT Inserted.Id VALUES (@Id,@ValueType,@Required,@IsStatic,@Name,@ConcurrencyStamp,@ExtraProperties)",
|
||||
InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "ConcurrencyStamp",
|
||||
FieldDbType = DbType.Guid,
|
||||
Value = Guid.NewGuid().ToString(),
|
||||
CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() {
|
||||
FieldName = "ExtraProperties",
|
||||
FieldDbType = DbType.String,
|
||||
Value = "{}",
|
||||
CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() {
|
||||
FieldName = "Required",
|
||||
FieldDbType = DbType.Boolean,
|
||||
Value = "false",
|
||||
CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() {
|
||||
FieldName = "IsStatic",
|
||||
FieldDbType = DbType.Boolean,
|
||||
Value = "false",
|
||||
CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() {
|
||||
FieldName = "ValueType",
|
||||
FieldDbType = DbType.Int16,
|
||||
Value = "0",
|
||||
CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
})
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
#region ClaimTypes Fields
|
||||
await _listFormFieldRepository.InsertManyAsync(
|
||||
[
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormClaimTypes.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 500,
|
||||
ListOrderNo = 0,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Create",
|
||||
R = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
U = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormClaimTypes.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 200,
|
||||
ListOrderNo = 1,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Create",
|
||||
R = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
U = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormClaimTypes.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Int16,
|
||||
FieldName = "ValueType",
|
||||
Width = 100,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||
{
|
||||
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||
DisplayExpr = "name",
|
||||
ValueExpr = "key",
|
||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||
new () { Key=0,Name="String" },
|
||||
new () { Key=1,Name="Number" },
|
||||
new () { Key=2,Name="Boolean" },
|
||||
new () { Key=3,Name="DateTime" },
|
||||
}),
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Create",
|
||||
R = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
U = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormClaimTypes.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "Required",
|
||||
Width = 100,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Create",
|
||||
R = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
U = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormClaimTypes.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsStatic",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Create",
|
||||
R = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
U = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormClaimTypes.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Regex",
|
||||
Width = 250,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Create",
|
||||
R = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
U = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormClaimTypes.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "RegexDescription",
|
||||
Width = 250,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Create",
|
||||
R = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
U = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
},
|
||||
new ListFormField
|
||||
{
|
||||
ListFormCode = listFormClaimTypes.ListFormCode,
|
||||
RoleId = null,
|
||||
UserId = null,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
Width = 250,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Create",
|
||||
R = AppCodes.IdentityPermissions.Users.ClaimTypes,
|
||||
U = AppCodes.IdentityPermissions.Users.ClaimTypes + ".Update",
|
||||
E = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto
|
||||
{
|
||||
IsPivot = true
|
||||
})
|
||||
}
|
||||
]);
|
||||
#endregion
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -612,6 +612,12 @@
|
|||
"en": "Administration",
|
||||
"tr": "Yönetim"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "AbpIdentity.Users.ClaimType",
|
||||
"en": "Claim Types",
|
||||
"tr": "Talep Tipleri"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "AbpIdentity.Users.SecurityLog",
|
||||
|
|
@ -645,8 +651,8 @@
|
|||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "AbpTenantManagement",
|
||||
"en": "Tenant Management",
|
||||
"tr": "Tenant Management"
|
||||
"en": "Tenants",
|
||||
"tr": "Tenants"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
@ -2001,8 +2007,8 @@
|
|||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.LockoutManagement.LoginAndLockoutSettings",
|
||||
"en": "Login And Lockout Settings",
|
||||
"tr": "Giriş ve Kilit Ayarları"
|
||||
"en": "Lockout Settings",
|
||||
"tr": "Kilit Ayarları"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
@ -2046,6 +2052,30 @@
|
|||
"en": "Update Time",
|
||||
"tr": "Güncelleme Tarihi"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.ClaimTypes",
|
||||
"en": "Claim Types",
|
||||
"tr": "Talep Tipleri"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.ClaimType",
|
||||
"en": "ClaimType",
|
||||
"tr": "Talep Tipi"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.NoClaimsFound",
|
||||
"en": "No Claims Found",
|
||||
"tr": "Talep Bulunamadı"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.ClaimValue",
|
||||
"en": "ClaimValue",
|
||||
"tr": "Talep Değeri"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "Abp.Identity.User.LockoutManagement",
|
||||
|
|
@ -5899,7 +5929,7 @@
|
|||
"ParentCode": null,
|
||||
"Code": "App.Platform",
|
||||
"DisplayName": "App.Platform",
|
||||
"Order": -1,
|
||||
"Order": 100,
|
||||
"Url": null,
|
||||
"Icon": "FcTabletAndroid",
|
||||
"RequiredPermissionName": null,
|
||||
|
|
@ -5909,47 +5939,17 @@
|
|||
"ParentCode": null,
|
||||
"Code": "App.Home",
|
||||
"DisplayName": "App.Home",
|
||||
"Order": 0,
|
||||
"Order": 200,
|
||||
"Url": "/",
|
||||
"Icon": "FcHome",
|
||||
"RequiredPermissionName": null,
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": null,
|
||||
"Code": "App.Setting",
|
||||
"DisplayName": "App.Setting",
|
||||
"Order": 1,
|
||||
"Url": "/settings",
|
||||
"Icon": "FcSettings",
|
||||
"RequiredPermissionName": "App.Setting",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Setting",
|
||||
"Code": "App.Settings.SettingDefinitions",
|
||||
"DisplayName": "App.Settings.SettingDefinitions",
|
||||
"Order": 1,
|
||||
"Url": "/list/List-0009",
|
||||
"Icon": "FcSupport",
|
||||
"RequiredPermissionName": "App.Settings.SettingDefinitions",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Setting",
|
||||
"Code": "App.Settings.GlobalSearch",
|
||||
"DisplayName": "App.Settings.GlobalSearch",
|
||||
"Order": 2,
|
||||
"Url": "/list/List-0018",
|
||||
"Icon": "FcSearch",
|
||||
"RequiredPermissionName": "App.Settings.GlobalSearch",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": null,
|
||||
"Code": "App.Saas",
|
||||
"DisplayName": "App.Saas",
|
||||
"Order": 2,
|
||||
"Order": 300,
|
||||
"Url": null,
|
||||
"Icon": "FcPodiumWithAudience",
|
||||
"RequiredPermissionName": null,
|
||||
|
|
@ -5976,30 +5976,40 @@
|
|||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": null,
|
||||
"Code": "App.Administration",
|
||||
"DisplayName": "App.Administration",
|
||||
"Order": 3,
|
||||
"Url": null,
|
||||
"Icon": "FcOrganization",
|
||||
"RequiredPermissionName": null,
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Settings",
|
||||
"DisplayName": "App.Settings",
|
||||
"Order": 0,
|
||||
"Order": 3,
|
||||
"Url": null,
|
||||
"Icon": "FcCircuit",
|
||||
"RequiredPermissionName": null,
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"ParentCode": "App.Settings",
|
||||
"Code": "App.Settings.SettingDefinitions",
|
||||
"DisplayName": "App.Settings.SettingDefinitions",
|
||||
"Order": 1,
|
||||
"Url": "/list/List-0009",
|
||||
"Icon": "FcSupport",
|
||||
"RequiredPermissionName": "App.Settings.SettingDefinitions",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Settings",
|
||||
"Code": "App.Settings.GlobalSearch",
|
||||
"DisplayName": "App.Settings.GlobalSearch",
|
||||
"Order": 2,
|
||||
"Url": "/list/List-0018",
|
||||
"Icon": "FcSearch",
|
||||
"RequiredPermissionName": "App.Settings.GlobalSearch",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Languages",
|
||||
"DisplayName": "App.Languages",
|
||||
"Order": 1,
|
||||
"Order": 4,
|
||||
"Url": null,
|
||||
"Icon": "FcGlobe",
|
||||
"RequiredPermissionName": null,
|
||||
|
|
@ -6025,6 +6035,36 @@
|
|||
"RequiredPermissionName": "App.Languages.LanguageText",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Menus",
|
||||
"DisplayName": "App.Menus",
|
||||
"Order": 5,
|
||||
"Url": "/list/List-0007",
|
||||
"Icon": "FcMenu",
|
||||
"RequiredPermissionName": "App.Menus",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": null,
|
||||
"Code": "App.Administration",
|
||||
"DisplayName": "App.Administration",
|
||||
"Order": 400,
|
||||
"Url": null,
|
||||
"Icon": "FcOrganization",
|
||||
"RequiredPermissionName": null,
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"Code": "App.Setting",
|
||||
"DisplayName": "App.Setting",
|
||||
"Order": 1,
|
||||
"Url": "/settings",
|
||||
"Icon": "FcSettings",
|
||||
"RequiredPermissionName": "App.Setting",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"Code": "Abp.Identity",
|
||||
|
|
@ -6039,7 +6079,7 @@
|
|||
"ParentCode": "Abp.Identity",
|
||||
"Code": "Abp.Identity.PermissionGroups",
|
||||
"DisplayName": "Abp.Identity.PermissionGroups",
|
||||
"Order": 0,
|
||||
"Order": 1,
|
||||
"Url": "/list/List-0017",
|
||||
"Icon": "FcEngineering",
|
||||
"RequiredPermissionName": "Abp.Identity.PermissionGroups",
|
||||
|
|
@ -6049,7 +6089,7 @@
|
|||
"ParentCode": "Abp.Identity",
|
||||
"Code": "Abp.Identity.Permissions",
|
||||
"DisplayName": "Abp.Identity.Permissions",
|
||||
"Order": 1,
|
||||
"Order": 2,
|
||||
"Url": "/list/List-0002",
|
||||
"Icon": "FcSupport",
|
||||
"RequiredPermissionName": "Abp.Identity.Permissions",
|
||||
|
|
@ -6059,7 +6099,7 @@
|
|||
"ParentCode": "Abp.Identity",
|
||||
"Code": "AbpIdentity.Roles",
|
||||
"DisplayName": "AbpIdentity.Roles",
|
||||
"Order": 2,
|
||||
"Order": 3,
|
||||
"Url": "/list/List-0003",
|
||||
"Icon": "FcFlowChart",
|
||||
"RequiredPermissionName": "AbpIdentity.Roles",
|
||||
|
|
@ -6069,57 +6109,57 @@
|
|||
"ParentCode": "Abp.Identity",
|
||||
"Code": "AbpIdentity.Users",
|
||||
"DisplayName": "AbpIdentity.Users",
|
||||
"Order": 3,
|
||||
"Order": 4,
|
||||
"Url": "/list/List-0004",
|
||||
"Icon": "FcBusinessman",
|
||||
"RequiredPermissionName": "AbpIdentity.Users",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "AbpIdentity.Users",
|
||||
"Code": "AbpIdentity.Users.SecurityLog",
|
||||
"DisplayName": "AbpIdentity.Users.SecurityLog",
|
||||
"Order": 6,
|
||||
"Url": "/list/List-0019",
|
||||
"Icon": "FcPrivacy",
|
||||
"RequiredPermissionName": "AbpIdentity.Users.SecurityLog",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "Abp.Identity",
|
||||
"Code": "Abp.Identity.OrganizationUnits",
|
||||
"DisplayName": "Abp.Identity.OrganizationUnits",
|
||||
"Order": 4,
|
||||
"Order": 5,
|
||||
"Url": "/admin/ous",
|
||||
"Icon": "FcOrganization",
|
||||
"RequiredPermissionName": "Abp.Identity.OrganizationUnits",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "Abp.Identity",
|
||||
"Code": "AbpIdentity.Users.ClaimType",
|
||||
"DisplayName": "AbpIdentity.Users.ClaimType",
|
||||
"Order": 6,
|
||||
"Url": "/list/List-0022",
|
||||
"Icon": "FcOrganization",
|
||||
"RequiredPermissionName": "AbpIdentity.Users.ClaimType",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "Abp.Identity",
|
||||
"Code": "App.IpRestrictions",
|
||||
"DisplayName": "App.IpRestrictions",
|
||||
"Order": 5,
|
||||
"Order": 7,
|
||||
"Url": "/list/List-0015",
|
||||
"Icon": "FcNfcSign",
|
||||
"RequiredPermissionName": "App.IpRestrictions",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"Code": "App.Menus",
|
||||
"DisplayName": "App.Menus",
|
||||
"Order": 3,
|
||||
"Url": "/list/List-0007",
|
||||
"Icon": "FcMenu",
|
||||
"RequiredPermissionName": "App.Menus",
|
||||
"ParentCode": "AbpIdentity.Users",
|
||||
"Code": "AbpIdentity.Users.SecurityLog",
|
||||
"DisplayName": "AbpIdentity.Users.SecurityLog",
|
||||
"Order": 8,
|
||||
"Url": "/list/List-0019",
|
||||
"Icon": "FcPrivacy",
|
||||
"RequiredPermissionName": "AbpIdentity.Users.SecurityLog",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Listforms",
|
||||
"DisplayName": "App.Listforms",
|
||||
"Order": 4,
|
||||
"Order": 6,
|
||||
"Url": null,
|
||||
"Icon": "FcList",
|
||||
"RequiredPermissionName": null,
|
||||
|
|
@ -6129,7 +6169,7 @@
|
|||
"ParentCode": "App.Listforms",
|
||||
"Code": "App.Listforms.DataSource",
|
||||
"DisplayName": "App.Listforms.DataSource",
|
||||
"Order": 0,
|
||||
"Order": 1,
|
||||
"Url": "/list/List-0011",
|
||||
"Icon": "FcAcceptDatabase",
|
||||
"RequiredPermissionName": "App.Listforms.DataSource",
|
||||
|
|
@ -6139,7 +6179,7 @@
|
|||
"ParentCode": "App.Listforms",
|
||||
"Code": "App.Listforms.Wizard",
|
||||
"DisplayName": "App.Listforms.Wizard",
|
||||
"Order": 1,
|
||||
"Order": 2,
|
||||
"Url": "/admin/listform/wizard",
|
||||
"Icon": "FcFlashAuto",
|
||||
"RequiredPermissionName": "App.Listforms.Wizard",
|
||||
|
|
@ -6149,7 +6189,7 @@
|
|||
"ParentCode": "App.Listforms",
|
||||
"Code": "App.Listforms.Listform",
|
||||
"DisplayName": "App.Listforms.Listform",
|
||||
"Order": 2,
|
||||
"Order": 3,
|
||||
"Url": "/list/List-0008",
|
||||
"Icon": "FcDataSheet",
|
||||
"RequiredPermissionName": "App.Listforms.Listform",
|
||||
|
|
@ -6159,17 +6199,17 @@
|
|||
"ParentCode": "App.Listforms",
|
||||
"Code": "App.Listforms.Chart",
|
||||
"DisplayName": "App.Listforms.Chart",
|
||||
"Order": 3,
|
||||
"Order": 4,
|
||||
"Url": "/list/List-0010",
|
||||
"Icon": "FcTodoList",
|
||||
"RequiredPermissionName": "App.Listforms.Chart",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.Notifications",
|
||||
"DisplayName": "App.Notifications",
|
||||
"Order": 5,
|
||||
"Order": 7,
|
||||
"Url": null,
|
||||
"Icon": "FcWorkflow",
|
||||
"RequiredPermissionName": null,
|
||||
|
|
@ -6196,20 +6236,20 @@
|
|||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.BackgroundWorkers",
|
||||
"DisplayName": "App.BackgroundWorkers",
|
||||
"Order": 6,
|
||||
"Order": 8,
|
||||
"Url": "/list/List-0012",
|
||||
"Icon": "FcWorkflow",
|
||||
"RequiredPermissionName": "App.BackgroundWorkers",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Administration",
|
||||
"ParentCode": "App.Saas",
|
||||
"Code": "App.PublicApis",
|
||||
"DisplayName": "App.PublicApis",
|
||||
"Order": 7,
|
||||
"Order": 9,
|
||||
"Url": "/list/List-0016",
|
||||
"Icon": "FcMindMap",
|
||||
"RequiredPermissionName": "App.PublicApis",
|
||||
|
|
@ -6219,7 +6259,7 @@
|
|||
"ParentCode": "App.Administration",
|
||||
"Code": "App.AuditLogs",
|
||||
"DisplayName": "App.AuditLogs",
|
||||
"Order": 8,
|
||||
"Order": 3,
|
||||
"Url": "/list/List-0020",
|
||||
"Icon": "FcMultipleInputs",
|
||||
"RequiredPermissionName": "App.AuditLogs",
|
||||
|
|
@ -6227,61 +6267,61 @@
|
|||
}
|
||||
],
|
||||
"PermissionGroupDefinitionRecords": [
|
||||
{
|
||||
"Name": "App.Platform",
|
||||
"DisplayName": "App.Platform"
|
||||
},
|
||||
{
|
||||
"Name": "AbpTenantManagement",
|
||||
"DisplayName": "AbpTenantManagement"
|
||||
},
|
||||
{
|
||||
"Name": "AbpIdentity",
|
||||
"DisplayName": "AbpIdentity"
|
||||
},
|
||||
{
|
||||
"Name": "App.Platform",
|
||||
"DisplayName": "App.Platform"
|
||||
},
|
||||
{
|
||||
"Name": "App.Setting",
|
||||
"DisplayName": "App.Setting"
|
||||
},
|
||||
{
|
||||
"Name": "App.Languages",
|
||||
"DisplayName": "App.Languages"
|
||||
},
|
||||
{
|
||||
"Name": "App.Listforms",
|
||||
"DisplayName": "App.Listforms"
|
||||
},
|
||||
{
|
||||
"Name": "App.Menus",
|
||||
"DisplayName": "App.Menus"
|
||||
"Name": "App.Branches",
|
||||
"DisplayName": "App.Branches"
|
||||
},
|
||||
{
|
||||
"Name": "App.Settings.SettingDefinitions",
|
||||
"DisplayName": "App.Settings.SettingDefinitions"
|
||||
},
|
||||
{
|
||||
"Name": "App.BackgroundWorkers",
|
||||
"DisplayName": "App.BackgroundWorkers"
|
||||
"Name": "App.Settings.GlobalSearch",
|
||||
"DisplayName": "App.Settings.GlobalSearch"
|
||||
},
|
||||
{
|
||||
"Name": "App.Languages",
|
||||
"DisplayName": "App.Languages"
|
||||
},
|
||||
{
|
||||
"Name": "App.Menus",
|
||||
"DisplayName": "App.Menus"
|
||||
},
|
||||
{
|
||||
"Name": "App.Listforms",
|
||||
"DisplayName": "App.Listforms"
|
||||
},
|
||||
{
|
||||
"Name": "App.Notifications",
|
||||
"DisplayName": "App.Notifications"
|
||||
},
|
||||
{
|
||||
"Name": "App.BackgroundWorkers",
|
||||
"DisplayName": "App.BackgroundWorkers"
|
||||
},
|
||||
{
|
||||
"Name": "App.PublicApis",
|
||||
"DisplayName": "App.PublicApis"
|
||||
},
|
||||
{
|
||||
"Name": "App.Settings.GlobalSearch",
|
||||
"DisplayName": "App.Settings.GlobalSearch"
|
||||
"Name": "App.Setting",
|
||||
"DisplayName": "App.Setting"
|
||||
},
|
||||
{
|
||||
"Name": "AbpIdentity",
|
||||
"DisplayName": "AbpIdentity"
|
||||
},
|
||||
{
|
||||
"Name": "App.AuditLogs",
|
||||
"DisplayName": "App.AuditLogs"
|
||||
},
|
||||
{
|
||||
"Name": "App.Branches",
|
||||
"DisplayName": "App.Branches"
|
||||
}
|
||||
],
|
||||
"PermissionDefinitionRecords": [
|
||||
|
|
@ -6340,6 +6380,14 @@
|
|||
"DisplayName": "AbpIdentity.Users.SecurityLog",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3
|
||||
},
|
||||
{
|
||||
"GroupName": "AbpIdentity",
|
||||
"Name": "AbpIdentity.Users.ClaimType",
|
||||
"ParentName": null,
|
||||
"DisplayName": "AbpIdentity.Users.ClaimType",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3
|
||||
},
|
||||
{
|
||||
"GroupName": "AbpIdentity",
|
||||
|
|
@ -6949,6 +6997,38 @@
|
|||
"IsEnabled": true,
|
||||
"MultiTenancySide": 2
|
||||
},
|
||||
{
|
||||
"GroupName": "AbpIdentity",
|
||||
"Name": "AbpIdentity.Users.ClaimType.Create",
|
||||
"ParentName": "AbpIdentity.Users.ClaimType",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3
|
||||
},
|
||||
{
|
||||
"GroupName": "AbpIdentity",
|
||||
"Name": "AbpIdentity.Users.ClaimType.Delete",
|
||||
"ParentName": "AbpIdentity.Users.ClaimType",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3
|
||||
},
|
||||
{
|
||||
"GroupName": "AbpIdentity",
|
||||
"Name": "AbpIdentity.Users.ClaimType.Export",
|
||||
"ParentName": "AbpIdentity.Users.ClaimType",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3
|
||||
},
|
||||
{
|
||||
"GroupName": "AbpIdentity",
|
||||
"Name": "AbpIdentity.Users.ClaimType.Update",
|
||||
"ParentName": "AbpIdentity.Users.ClaimType",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3
|
||||
},
|
||||
{
|
||||
"GroupName": "AbpIdentity",
|
||||
"Name": "App.IpRestrictions.Create",
|
||||
|
|
|
|||
|
|
@ -327,7 +327,8 @@ public static class PlatformConsts
|
|||
public const string GlobalSearch = "List-0018";
|
||||
public const string SecurityLog = "List-0019";
|
||||
public const string AuditLog = "List-0020";
|
||||
public const string Branch = "List-0022";
|
||||
public const string Branch = "List-0021";
|
||||
public const string ClaimTypes = "List-0022";
|
||||
public const string ListformField = "List-1000";
|
||||
public const string Order = "List-Order";
|
||||
public const string Complaint = "List-Complaint";
|
||||
|
|
|
|||
|
|
@ -319,6 +319,7 @@ public static class SeedConsts
|
|||
{
|
||||
public const string Default = GroupName + ".Users";
|
||||
public const string SecurityLogs = Default + ".SecurityLog";
|
||||
public const string ClaimTypes = Default + ".ClaimType";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,10 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Security.Claims;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Amazon.Runtime.Internal.Endpoints.StandardLibrary;
|
||||
using Kurs.Platform.Extensions;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Identity;
|
||||
using Volo.Abp.Security.Claims;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import {
|
|||
IdentityUserDto,
|
||||
PermissionDefinitionRecord,
|
||||
UpdatePermissionsDto,
|
||||
UserClaimModel,
|
||||
UserInfoViewModel,
|
||||
} from '@/proxy/admin'
|
||||
import apiService from '@/services/api.service'
|
||||
|
|
@ -71,4 +72,17 @@ export const getAuditLogs = (id: string) =>
|
|||
apiService.fetchData<AuditLogDto>({
|
||||
method: 'GET',
|
||||
url: `/api/app/audit-log/${id}`,
|
||||
})
|
||||
|
||||
export const postClaimUser = (input: UserClaimModel) =>
|
||||
apiService.fetchData({
|
||||
method: 'POST',
|
||||
url: `/api/app/platform-identity/claim-user`,
|
||||
data: input,
|
||||
})
|
||||
|
||||
export const deleteClaimUser = (id: string, userId?: string) =>
|
||||
apiService.fetchData({
|
||||
method: 'DELETE',
|
||||
url: `/api/app/platform-identity/${id}/claim-user/${userId}`,
|
||||
})
|
||||
|
|
@ -123,6 +123,7 @@ export interface UserInfoViewModel extends ExtensibleObject {
|
|||
userRoleNames: string[]
|
||||
roles: AssignedRoleViewModel[]
|
||||
branches: AssignedRoleViewModel[]
|
||||
claims: AssignedClaimViewModel[]
|
||||
lockUser: boolean
|
||||
lastPasswordChangeTime?: Date | string
|
||||
|
||||
|
|
@ -143,4 +144,20 @@ export interface AssignedRoleViewModel {
|
|||
export interface AssignedBranchViewModel {
|
||||
name?: string
|
||||
isAssigned: boolean
|
||||
}
|
||||
}
|
||||
|
||||
export interface AssignedClaimViewModel
|
||||
{
|
||||
id: string
|
||||
claimType: string
|
||||
claimValue: string
|
||||
isAssigned: boolean
|
||||
}
|
||||
|
||||
export interface UserClaimModel
|
||||
{
|
||||
id?: string
|
||||
userId?: string
|
||||
claimType: string
|
||||
claimValue: string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,31 +6,56 @@ import {
|
|||
FormItem,
|
||||
Input,
|
||||
Notification,
|
||||
Select,
|
||||
Tabs,
|
||||
toast,
|
||||
} from '@/components/ui'
|
||||
import Dialog from '@/components/ui/Dialog'
|
||||
import DateTimepicker from '@/components/ui/DatePicker/DateTimepicker'
|
||||
import Table from '@/components/ui/Table'
|
||||
import TBody from '@/components/ui/Table/TBody'
|
||||
import Td from '@/components/ui/Table/Td'
|
||||
import Th from '@/components/ui/Table/Th'
|
||||
import THead from '@/components/ui/Table/THead'
|
||||
import Tr from '@/components/ui/Table/Tr'
|
||||
import TabContent from '@/components/ui/Tabs/TabContent'
|
||||
import TabList from '@/components/ui/Tabs/TabList'
|
||||
import TabNav from '@/components/ui/Tabs/TabNav'
|
||||
import { UserInfoViewModel } from '@/proxy/admin'
|
||||
import { getUserDetail, putUserDetail, putUserLookout } from '@/proxy/admin/identity.service'
|
||||
import { AssignedClaimViewModel, UserInfoViewModel } from '@/proxy/admin'
|
||||
import {
|
||||
deleteClaimUser,
|
||||
getUserDetail,
|
||||
postClaimUser,
|
||||
putUserDetail,
|
||||
putUserLookout,
|
||||
} from '@/proxy/admin/identity.service'
|
||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||
import dayjs from 'dayjs'
|
||||
import { Field, FieldArray, FieldProps, Form, Formik } from 'formik'
|
||||
import { Field, FieldArray, FieldProps, Form, Formik, FormikHelpers } from 'formik'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { HiOutlineLockOpen, HiOutlineUser } from 'react-icons/hi'
|
||||
import { HiOutlineLockOpen, HiOutlineUser, HiOutlineDocumentAdd } from 'react-icons/hi'
|
||||
import { MdDelete } from 'react-icons/md'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import * as Yup from 'yup'
|
||||
import { SelectBoxOption } from '@/shared/types'
|
||||
import { ConfirmDialog } from '@/components/shared'
|
||||
|
||||
export interface ClaimTypeDto {
|
||||
claimType: string
|
||||
claimValue: string
|
||||
}
|
||||
|
||||
function UserDetails() {
|
||||
const { userId } = useParams()
|
||||
const { translate } = useLocalization()
|
||||
const [userDetails, setUserDetails] = useState<UserInfoViewModel>()
|
||||
const [loading, setLoading] = useState(true)
|
||||
const [open, setOpen] = useState(false)
|
||||
const [confirmDeleteClaim, setConfirmDeleteClaim] = useState<AssignedClaimViewModel | null>(null)
|
||||
|
||||
const getUser = async () => {
|
||||
const { data } = await getUserDetail(userId || '')
|
||||
|
||||
setUserDetails(data)
|
||||
}
|
||||
|
||||
|
|
@ -38,7 +63,45 @@ function UserDetails() {
|
|||
getUser()
|
||||
}, [])
|
||||
|
||||
//translate('::AbpIdentity.Profile'),
|
||||
const scheme = Yup.object().shape({
|
||||
claimType: Yup.string().required(),
|
||||
claimValue: Yup.string().required(),
|
||||
})
|
||||
|
||||
const handleSubmit = async (
|
||||
values: ClaimTypeDto,
|
||||
{ setSubmitting }: FormikHelpers<ClaimTypeDto>,
|
||||
) => {
|
||||
setLoading(true)
|
||||
setSubmitting(true)
|
||||
|
||||
try {
|
||||
await postClaimUser({ userId, claimType: values.claimType, claimValue: values.claimValue })
|
||||
toast.push(
|
||||
<Notification type="success" duration={2000}>
|
||||
{translate('::Kaydet')}
|
||||
</Notification>,
|
||||
{
|
||||
placement: 'top-center',
|
||||
},
|
||||
)
|
||||
setOpen(false)
|
||||
getUser()
|
||||
} catch (error) {
|
||||
toast.push(
|
||||
<Notification type="danger" duration={2000}>
|
||||
{'Hata'}
|
||||
</Notification>,
|
||||
{
|
||||
placement: 'top-center',
|
||||
},
|
||||
)
|
||||
} finally {
|
||||
setLoading(false)
|
||||
setSubmitting(false)
|
||||
}
|
||||
}
|
||||
|
||||
return userDetails ? (
|
||||
<>
|
||||
<Helmet
|
||||
|
|
@ -49,10 +112,13 @@ function UserDetails() {
|
|||
<Tabs defaultValue="user">
|
||||
<TabList>
|
||||
<TabNav value="user" icon={<HiOutlineUser />}>
|
||||
{ translate('::Abp.Identity.User.UserInformation') }
|
||||
{translate('::Abp.Identity.User.UserInformation')}
|
||||
</TabNav>
|
||||
<TabNav value="lockout" icon={<HiOutlineLockOpen />}>
|
||||
{ translate('::Abp.Identity.User.LockoutManagement') }
|
||||
{translate('::Abp.Identity.User.LockoutManagement')}
|
||||
</TabNav>
|
||||
<TabNav value="claimTypes" icon={<HiOutlineLockOpen />}>
|
||||
{translate('::Abp.Identity.User.ClaimTypes')}
|
||||
</TabNav>
|
||||
</TabList>
|
||||
<TabContent value="user">
|
||||
|
|
@ -95,14 +161,23 @@ function UserDetails() {
|
|||
|
||||
{/* Personal Information */}
|
||||
<div>
|
||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.Surname')}>
|
||||
<Field type="text" name="surname" placeholder="Surname" component={Input} />
|
||||
<FormItem
|
||||
label={translate('::Abp.Identity.User.UserInformation.Surname')}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
name="surname"
|
||||
placeholder="Surname"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
|
||||
{/* Şube Management */}
|
||||
<div>
|
||||
<h6 className="mb-4">{translate('::Abp.Identity.User.UserInformation.BranchManagement')}</h6>
|
||||
<h6 className="mb-4">
|
||||
{translate('::Abp.Identity.User.UserInformation.BranchManagement')}
|
||||
</h6>
|
||||
<div className="border-2 rounded-lg p-4">
|
||||
<FieldArray name="branches">
|
||||
{({ form, remove, push }) => (
|
||||
|
|
@ -132,7 +207,9 @@ function UserDetails() {
|
|||
|
||||
{/* Role Management */}
|
||||
<div>
|
||||
<h6 className="mb-4">{translate('::Abp.Identity.User.UserInformation.RoleManagement')}</h6>
|
||||
<h6 className="mb-4">
|
||||
{translate('::Abp.Identity.User.UserInformation.RoleManagement')}
|
||||
</h6>
|
||||
<div className="border-2 rounded-lg p-4">
|
||||
<FieldArray name="roles">
|
||||
{({ form, remove, push }) => (
|
||||
|
|
@ -162,22 +239,50 @@ function UserDetails() {
|
|||
|
||||
{/* Contact Information */}
|
||||
<div>
|
||||
<h6 className="mb-4">{translate('::Abp.Identity.User.UserInformation.ContactInformation')}</h6>
|
||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.EmailAddress')}>
|
||||
<Field type="text" disabled name="email" placeholder="Email Address" component={Input} />
|
||||
<h6 className="mb-4">
|
||||
{translate('::Abp.Identity.User.UserInformation.ContactInformation')}
|
||||
</h6>
|
||||
<FormItem
|
||||
label={translate('::Abp.Identity.User.UserInformation.EmailAddress')}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
disabled
|
||||
name="email"
|
||||
placeholder="Email Address"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.PhoneNumber')}>
|
||||
<Field type="text" name="phoneNumber" placeholder="Phone Number" component={Input} />
|
||||
<FormItem
|
||||
label={translate('::Abp.Identity.User.UserInformation.PhoneNumber')}
|
||||
>
|
||||
<Field
|
||||
type="text"
|
||||
name="phoneNumber"
|
||||
placeholder="Phone Number"
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem label={translate('::RocketUsername')}>
|
||||
<Field type="text" name="rocketUsername" placeholder={translate('::RocketUsername')} component={Input} />
|
||||
<Field
|
||||
type="text"
|
||||
name="rocketUsername"
|
||||
placeholder={translate('::RocketUsername')}
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
</div>
|
||||
|
||||
{/* Account Timestamps */}
|
||||
<div>
|
||||
<h6 className="mb-4">{translate('::Abp.Identity.User.UserInformation.AccountTimestamps')}</h6>
|
||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.PasswordChangeTime')}>
|
||||
<h6 className="mb-4">
|
||||
{translate('::Abp.Identity.User.UserInformation.AccountTimestamps')}
|
||||
</h6>
|
||||
<FormItem
|
||||
label={translate(
|
||||
'::Abp.Identity.User.UserInformation.PasswordChangeTime',
|
||||
)}
|
||||
>
|
||||
<Field name="lastPasswordChangeTime">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<DateTimepicker
|
||||
|
|
@ -195,25 +300,33 @@ function UserDetails() {
|
|||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.CreateTime')}>
|
||||
<FormItem
|
||||
label={translate('::Abp.Identity.User.UserInformation.CreateTime')}
|
||||
>
|
||||
<Field name="creationTime">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<Input
|
||||
field={field}
|
||||
form={form}
|
||||
value={field.value ? dayjs(field.value).format('L LT') : undefined}
|
||||
value={
|
||||
field.value ? dayjs(field.value).format('L LT') : undefined
|
||||
}
|
||||
disabled
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.UpdateTime')}>
|
||||
<FormItem
|
||||
label={translate('::Abp.Identity.User.UserInformation.UpdateTime')}
|
||||
>
|
||||
<Field name="lastModificationTime">
|
||||
{({ field, form }: FieldProps) => (
|
||||
<Input
|
||||
field={field}
|
||||
form={form}
|
||||
value={field.value ? dayjs(field.value).format('L LT') : undefined}
|
||||
value={
|
||||
field.value ? dayjs(field.value).format('L LT') : undefined
|
||||
}
|
||||
disabled
|
||||
/>
|
||||
)}
|
||||
|
|
@ -267,25 +380,37 @@ function UserDetails() {
|
|||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 w-full">
|
||||
{/* Account Status */}
|
||||
<div>
|
||||
<h6 className="mb-4">{translate('::Abp.Identity.User.LockoutManagement.AccountStatus')}</h6>
|
||||
<h6 className="mb-4">
|
||||
{translate('::Abp.Identity.User.LockoutManagement.AccountStatus')}
|
||||
</h6>
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.Status')}
|
||||
>
|
||||
<Field name="isActive" placeholder={translate('::Abp.Identity.User.LockoutManagement.Status')} component={Checkbox} />
|
||||
<Field
|
||||
name="isActive"
|
||||
placeholder={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.Status',
|
||||
)}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AdminVerification')}
|
||||
label={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.AdminVerification',
|
||||
)}
|
||||
>
|
||||
<Field
|
||||
name="isVerified"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AdminVerification')}
|
||||
placeholder={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.AdminVerification',
|
||||
)}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
|
@ -294,11 +419,15 @@ function UserDetails() {
|
|||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.EmailConfirmed')}
|
||||
label={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.EmailConfirmed',
|
||||
)}
|
||||
>
|
||||
<Field
|
||||
name="emailConfirmed"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.EmailConfirmed')}
|
||||
placeholder={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.EmailConfirmed',
|
||||
)}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
|
@ -307,11 +436,15 @@ function UserDetails() {
|
|||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed')}
|
||||
label={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed',
|
||||
)}
|
||||
>
|
||||
<Field
|
||||
name="phoneNumberConfirmed"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed')}
|
||||
placeholder={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed',
|
||||
)}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
|
@ -320,11 +453,15 @@ function UserDetails() {
|
|||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.TwoFactorEnabled')}
|
||||
label={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.TwoFactorEnabled',
|
||||
)}
|
||||
>
|
||||
<Field
|
||||
name="twoFactorEnabled"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.TwoFactorEnabled')}
|
||||
placeholder={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.TwoFactorEnabled',
|
||||
)}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
|
@ -332,12 +469,18 @@ function UserDetails() {
|
|||
|
||||
{/* Login & Lockout Settings */}
|
||||
<div>
|
||||
<h6 className="mb-4">{translate('::Abp.Identity.User.LockoutManagement.LoginAndLockoutSettings')}</h6>
|
||||
<h6 className="mb-4">
|
||||
{translate(
|
||||
'::Abp.Identity.User.LockoutManagement.LoginAndLockoutSettings',
|
||||
)}
|
||||
</h6>
|
||||
<FormItem
|
||||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.LoginEndDate')}
|
||||
label={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.LoginEndDate',
|
||||
)}
|
||||
>
|
||||
<Field name="loginEndDate">
|
||||
{({ field, form }: FieldProps) => (
|
||||
|
|
@ -345,7 +488,9 @@ function UserDetails() {
|
|||
field={field}
|
||||
form={form}
|
||||
value={field.value ? dayjs(field.value).toDate() : null}
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.LoginEndDate')}
|
||||
placeholder={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.LoginEndDate',
|
||||
)}
|
||||
onChange={(date) => {
|
||||
form.setFieldValue(
|
||||
field.name,
|
||||
|
|
@ -361,11 +506,15 @@ function UserDetails() {
|
|||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled')}
|
||||
label={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled',
|
||||
)}
|
||||
>
|
||||
<Field
|
||||
name="lockoutEnabled"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled')}
|
||||
placeholder={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled',
|
||||
)}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
|
@ -374,11 +523,15 @@ function UserDetails() {
|
|||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountLocked')}
|
||||
label={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.AccountLocked',
|
||||
)}
|
||||
>
|
||||
<Field
|
||||
name="lockUser"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountLocked')}
|
||||
placeholder={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.AccountLocked',
|
||||
)}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
|
@ -387,7 +540,9 @@ function UserDetails() {
|
|||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountEndDate')}
|
||||
label={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.AccountEndDate',
|
||||
)}
|
||||
>
|
||||
<Field name="lockoutEnd">
|
||||
{({ field, form }: FieldProps) => (
|
||||
|
|
@ -395,7 +550,9 @@ function UserDetails() {
|
|||
field={field}
|
||||
form={form}
|
||||
value={field.value ? dayjs(field.value).toDate() : null}
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountEndDate')}
|
||||
placeholder={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.AccountEndDate',
|
||||
)}
|
||||
onChange={(date) => {
|
||||
form.setFieldValue(
|
||||
field.name,
|
||||
|
|
@ -411,11 +568,15 @@ function UserDetails() {
|
|||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin')}
|
||||
label={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin',
|
||||
)}
|
||||
>
|
||||
<Field
|
||||
name="shouldChangePasswordOnNextLogin"
|
||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin')}
|
||||
placeholder={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin',
|
||||
)}
|
||||
component={Checkbox}
|
||||
/>
|
||||
</FormItem>
|
||||
|
|
@ -424,7 +585,9 @@ function UserDetails() {
|
|||
layout="horizontal"
|
||||
labelClass="!justify-start"
|
||||
labelWidth="50%"
|
||||
label={translate('::Abp.Identity.User.LockoutManagement.AccessFailedCount')}
|
||||
label={translate(
|
||||
'::Abp.Identity.User.LockoutManagement.AccessFailedCount',
|
||||
)}
|
||||
>
|
||||
<Field type="number" name="accessFailedCount" component={Input} />
|
||||
</FormItem>
|
||||
|
|
@ -444,7 +607,145 @@ function UserDetails() {
|
|||
</Formik>
|
||||
</div>
|
||||
</TabContent>
|
||||
<TabContent value="claimTypes">
|
||||
<div className="mt-5 w-1/2">
|
||||
<Table compact>
|
||||
<THead>
|
||||
<Tr>
|
||||
<Th className="text-center">
|
||||
<Button
|
||||
shape="circle"
|
||||
variant="plain"
|
||||
type="button"
|
||||
size="xs"
|
||||
title="Add"
|
||||
icon={<HiOutlineDocumentAdd />}
|
||||
onClick={async (e) => {
|
||||
setOpen(true)
|
||||
}}
|
||||
/>
|
||||
</Th>
|
||||
<Th>{translate('::Abp.Identity.User.ClaimType')}</Th>
|
||||
<Th>{translate('::Abp.Identity.User.ClaimValue')}</Th>
|
||||
</Tr>
|
||||
</THead>
|
||||
<TBody>
|
||||
{userDetails.claims.filter((a) => a.isAssigned === true) &&
|
||||
userDetails.claims.filter((a) => a.isAssigned === true).length > 0 ? (
|
||||
userDetails.claims.map((claim) => (
|
||||
<Tr key={claim.id}>
|
||||
<Td>
|
||||
<Button
|
||||
shape="circle"
|
||||
variant="plain"
|
||||
type="button"
|
||||
size="xs"
|
||||
title="Delete"
|
||||
icon={<MdDelete />}
|
||||
onClick={() => setConfirmDeleteClaim(claim)}
|
||||
/>
|
||||
</Td>
|
||||
<Td>{claim.claimType}</Td>
|
||||
<Td>{claim.claimValue}</Td>
|
||||
</Tr>
|
||||
))
|
||||
) : (
|
||||
<Tr>
|
||||
<Td colSpan={3} className="text-center">
|
||||
{translate('::Abp.Identity.User.NoClaimsFound')}
|
||||
</Td>
|
||||
</Tr>
|
||||
)}
|
||||
</TBody>
|
||||
</Table>
|
||||
</div>
|
||||
</TabContent>
|
||||
</Tabs>
|
||||
|
||||
<Dialog isOpen={open} onClose={() => setOpen(false)} onRequestClose={() => setOpen(false)}>
|
||||
<Formik
|
||||
initialValues={{ claimType: '', claimValue: '' }}
|
||||
validationSchema={scheme}
|
||||
onSubmit={handleSubmit}
|
||||
>
|
||||
{({ touched, errors, values, isSubmitting }) => {
|
||||
const claimOptions: SelectBoxOption[] = userDetails?.claims.map((claim) => ({
|
||||
value: claim.claimType,
|
||||
label: claim.claimType,
|
||||
}))
|
||||
|
||||
return (
|
||||
<Form>
|
||||
<FormContainer size="sm">
|
||||
<FormItem
|
||||
label={translate('::Abp.Identity.User.ClaimType')}
|
||||
invalid={errors.claimType && touched.claimType}
|
||||
errorMessage={errors.claimType}
|
||||
>
|
||||
<Field type="text" name="claimType">
|
||||
{({ field, form }: FieldProps<SelectBoxOption>) => (
|
||||
<Select
|
||||
field={field}
|
||||
form={form}
|
||||
options={claimOptions}
|
||||
isClearable={true}
|
||||
value={claimOptions.filter((option) => option.value === values.claimType)}
|
||||
onChange={(option) => form.setFieldValue(field.name, option?.value)}
|
||||
/>
|
||||
)}
|
||||
</Field>
|
||||
</FormItem>
|
||||
|
||||
<FormItem
|
||||
label={translate('::Abp.Identity.User.ClaimValue')}
|
||||
invalid={errors.claimValue && touched.claimValue}
|
||||
errorMessage={errors.claimValue}
|
||||
>
|
||||
<Field type="text" autoComplete="off" name="claimValue" component={Input} />
|
||||
</FormItem>
|
||||
|
||||
<div className="mt-6 flex flex-row justify-end gap-3">
|
||||
<Button variant="solid" loading={isSubmitting} type="submit">
|
||||
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||
</Button>
|
||||
<Button type="button" variant="plain" onClick={() => setOpen(false)}>
|
||||
{translate('::Cancel')}
|
||||
</Button>
|
||||
</div>
|
||||
</FormContainer>
|
||||
</Form>
|
||||
)
|
||||
}}
|
||||
</Formik>
|
||||
</Dialog>
|
||||
|
||||
<ConfirmDialog
|
||||
isOpen={!!confirmDeleteClaim}
|
||||
type="danger"
|
||||
title={translate('::DeleteConfirmation')}
|
||||
confirmText={translate('::Delete')}
|
||||
cancelText={translate('::Cancel')}
|
||||
confirmButtonColor="red-600"
|
||||
onCancel={() => setConfirmDeleteClaim(null)}
|
||||
onConfirm={async () => {
|
||||
if (confirmDeleteClaim) {
|
||||
await deleteClaimUser(confirmDeleteClaim.id, userId)
|
||||
toast.push(
|
||||
<Notification type="success" duration={2000}>
|
||||
{translate('::Abp.Identity.User.ClaimDeleted')}
|
||||
</Notification>,
|
||||
{ placement: 'top-center' },
|
||||
)
|
||||
setConfirmDeleteClaim(null)
|
||||
getUser()
|
||||
}
|
||||
}}
|
||||
>
|
||||
<p>
|
||||
<span className="font-semibold">{confirmDeleteClaim?.claimType}</span> claim silmek
|
||||
istediğinize emin misiniz?
|
||||
</p>
|
||||
</ConfirmDialog>
|
||||
</>
|
||||
) : (
|
||||
<></>
|
||||
|
|
|
|||
Loading…
Reference in a new issue