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; }
|
||||||
|
}
|
||||||
|
|
@ -38,6 +38,8 @@ public class UserInfoViewModel: ExtensibleObject
|
||||||
|
|
||||||
public AssignedBranchViewModel[] Branches { get; set; }
|
public AssignedBranchViewModel[] Branches { get; set; }
|
||||||
|
|
||||||
|
public AssignedClaimViewModel[] Claims { get; set; }
|
||||||
|
|
||||||
public bool LockUser { get; set; }
|
public bool LockUser { get; set; }
|
||||||
|
|
||||||
public DateTimeOffset? LastPasswordChangeTime { get; set; }
|
public DateTimeOffset? LastPasswordChangeTime { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,16 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Security.Claims;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Kurs.Platform.Entities;
|
using Kurs.Platform.Entities;
|
||||||
using Kurs.Platform.Extensions;
|
using Kurs.Platform.Extensions;
|
||||||
using Kurs.Platform.Identity.Dto;
|
using Kurs.Platform.Identity.Dto;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Volo.Abp.Application.Services;
|
using Volo.Abp.Application.Services;
|
||||||
using Volo.Abp.Domain.Repositories;
|
using Volo.Abp.Domain.Repositories;
|
||||||
|
using Volo.Abp.Guids;
|
||||||
using Volo.Abp.Identity;
|
using Volo.Abp.Identity;
|
||||||
using Volo.Abp.PermissionManagement;
|
using Volo.Abp.PermissionManagement;
|
||||||
|
|
||||||
|
|
@ -21,6 +24,8 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
public IRepository<PermissionDefinitionRecord, Guid> permissionRepository { get; }
|
public IRepository<PermissionDefinitionRecord, Guid> permissionRepository { get; }
|
||||||
public IRepository<Branch, Guid> branchRepository { get; }
|
public IRepository<Branch, Guid> branchRepository { get; }
|
||||||
public IRepository<BranchUsers, Guid> branchUsersRepository { get; }
|
public IRepository<BranchUsers, Guid> branchUsersRepository { get; }
|
||||||
|
public IRepository<IdentityClaimType, Guid> claimTypesRepository { get; }
|
||||||
|
public IGuidGenerator guidGenerator { get; }
|
||||||
public IdentityUserManager UserManager { get; set; }
|
public IdentityUserManager UserManager { get; set; }
|
||||||
|
|
||||||
public PlatformIdentityAppService(
|
public PlatformIdentityAppService(
|
||||||
|
|
@ -28,7 +33,9 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
IIdentityUserRepository identityUserRepository,
|
IIdentityUserRepository identityUserRepository,
|
||||||
IRepository<PermissionDefinitionRecord, Guid> permissionRepository,
|
IRepository<PermissionDefinitionRecord, Guid> permissionRepository,
|
||||||
IRepository<Branch, Guid> branchRepository,
|
IRepository<Branch, Guid> branchRepository,
|
||||||
IRepository<BranchUsers, Guid> branchUsersRepository
|
IRepository<BranchUsers, Guid> branchUsersRepository,
|
||||||
|
IRepository<IdentityClaimType, Guid> claimTypesRepository,
|
||||||
|
IGuidGenerator guidGenerator
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.IdentityUserAppService = identityUserAppService;
|
this.IdentityUserAppService = identityUserAppService;
|
||||||
|
|
@ -36,6 +43,8 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
this.permissionRepository = permissionRepository;
|
this.permissionRepository = permissionRepository;
|
||||||
this.branchRepository = branchRepository;
|
this.branchRepository = branchRepository;
|
||||||
this.branchUsersRepository = branchUsersRepository;
|
this.branchUsersRepository = branchUsersRepository;
|
||||||
|
this.claimTypesRepository = claimTypesRepository;
|
||||||
|
this.guidGenerator = guidGenerator;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<UserInfoViewModel> GetByIdAsync(Guid UserId)
|
public async Task<UserInfoViewModel> GetByIdAsync(Guid UserId)
|
||||||
|
|
@ -52,10 +61,11 @@ 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 currentTenantId = CurrentTenant.Id.HasValue ? CurrentTenant.Id : null;
|
||||||
|
|
||||||
|
//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 branchList = await branchRepository.GetListAsync(a => a.TenantId == currentTenantId);
|
||||||
var branches = branchList.Select(branch => new AssignedBranchViewModel
|
var branches = branchList.Select(branch => new AssignedBranchViewModel
|
||||||
{
|
{
|
||||||
|
|
@ -65,6 +75,21 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
})
|
})
|
||||||
.ToArray();
|
.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()
|
return new UserInfoViewModel()
|
||||||
{
|
{
|
||||||
Id = user.Id,
|
Id = user.Id,
|
||||||
|
|
@ -73,6 +98,7 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
Surname = user.Surname,
|
Surname = user.Surname,
|
||||||
Roles = roles,
|
Roles = roles,
|
||||||
Branches = branches,
|
Branches = branches,
|
||||||
|
Claims = claims,
|
||||||
Email = user.Email,
|
Email = user.Email,
|
||||||
PhoneNumber = user.PhoneNumber,
|
PhoneNumber = user.PhoneNumber,
|
||||||
IsActive = user.IsActive,
|
IsActive = user.IsActive,
|
||||||
|
|
@ -177,4 +203,19 @@ public class PlatformIdentityAppService : ApplicationService
|
||||||
|
|
||||||
return [.. list.OrderBy(p => p.Name)];
|
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();
|
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
|
#region Tenants
|
||||||
var listFormTenants = await _listFormRepository.InsertAsync(
|
var listFormTenants = await _listFormRepository.InsertAsync(
|
||||||
new ListForm()
|
new ListForm()
|
||||||
|
|
@ -8204,5 +8514,371 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
]);
|
]);
|
||||||
#endregion
|
#endregion
|
||||||
#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",
|
"en": "Administration",
|
||||||
"tr": "Yönetim"
|
"tr": "Yönetim"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "AbpIdentity.Users.ClaimType",
|
||||||
|
"en": "Claim Types",
|
||||||
|
"tr": "Talep Tipleri"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "AbpIdentity.Users.SecurityLog",
|
"key": "AbpIdentity.Users.SecurityLog",
|
||||||
|
|
@ -645,8 +651,8 @@
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "AbpTenantManagement",
|
"key": "AbpTenantManagement",
|
||||||
"en": "Tenant Management",
|
"en": "Tenants",
|
||||||
"tr": "Tenant Management"
|
"tr": "Tenants"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
@ -2001,8 +2007,8 @@
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "Abp.Identity.User.LockoutManagement.LoginAndLockoutSettings",
|
"key": "Abp.Identity.User.LockoutManagement.LoginAndLockoutSettings",
|
||||||
"en": "Login And Lockout Settings",
|
"en": "Lockout Settings",
|
||||||
"tr": "Giriş ve Kilit Ayarları"
|
"tr": "Kilit Ayarları"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
@ -2046,6 +2052,30 @@
|
||||||
"en": "Update Time",
|
"en": "Update Time",
|
||||||
"tr": "Güncelleme Tarihi"
|
"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",
|
"resourceName": "Platform",
|
||||||
"key": "Abp.Identity.User.LockoutManagement",
|
"key": "Abp.Identity.User.LockoutManagement",
|
||||||
|
|
@ -5899,7 +5929,7 @@
|
||||||
"ParentCode": null,
|
"ParentCode": null,
|
||||||
"Code": "App.Platform",
|
"Code": "App.Platform",
|
||||||
"DisplayName": "App.Platform",
|
"DisplayName": "App.Platform",
|
||||||
"Order": -1,
|
"Order": 100,
|
||||||
"Url": null,
|
"Url": null,
|
||||||
"Icon": "FcTabletAndroid",
|
"Icon": "FcTabletAndroid",
|
||||||
"RequiredPermissionName": null,
|
"RequiredPermissionName": null,
|
||||||
|
|
@ -5909,47 +5939,17 @@
|
||||||
"ParentCode": null,
|
"ParentCode": null,
|
||||||
"Code": "App.Home",
|
"Code": "App.Home",
|
||||||
"DisplayName": "App.Home",
|
"DisplayName": "App.Home",
|
||||||
"Order": 0,
|
"Order": 200,
|
||||||
"Url": "/",
|
"Url": "/",
|
||||||
"Icon": "FcHome",
|
"Icon": "FcHome",
|
||||||
"RequiredPermissionName": null,
|
"RequiredPermissionName": null,
|
||||||
"IsDisabled": false
|
"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,
|
"ParentCode": null,
|
||||||
"Code": "App.Saas",
|
"Code": "App.Saas",
|
||||||
"DisplayName": "App.Saas",
|
"DisplayName": "App.Saas",
|
||||||
"Order": 2,
|
"Order": 300,
|
||||||
"Url": null,
|
"Url": null,
|
||||||
"Icon": "FcPodiumWithAudience",
|
"Icon": "FcPodiumWithAudience",
|
||||||
"RequiredPermissionName": null,
|
"RequiredPermissionName": null,
|
||||||
|
|
@ -5976,30 +5976,40 @@
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": null,
|
"ParentCode": "App.Saas",
|
||||||
"Code": "App.Administration",
|
|
||||||
"DisplayName": "App.Administration",
|
|
||||||
"Order": 3,
|
|
||||||
"Url": null,
|
|
||||||
"Icon": "FcOrganization",
|
|
||||||
"RequiredPermissionName": null,
|
|
||||||
"IsDisabled": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ParentCode": "App.Administration",
|
|
||||||
"Code": "App.Settings",
|
"Code": "App.Settings",
|
||||||
"DisplayName": "App.Settings",
|
"DisplayName": "App.Settings",
|
||||||
"Order": 0,
|
"Order": 3,
|
||||||
"Url": null,
|
"Url": null,
|
||||||
"Icon": "FcCircuit",
|
"Icon": "FcCircuit",
|
||||||
"RequiredPermissionName": null,
|
"RequiredPermissionName": null,
|
||||||
"IsDisabled": false
|
"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",
|
"Code": "App.Languages",
|
||||||
"DisplayName": "App.Languages",
|
"DisplayName": "App.Languages",
|
||||||
"Order": 1,
|
"Order": 4,
|
||||||
"Url": null,
|
"Url": null,
|
||||||
"Icon": "FcGlobe",
|
"Icon": "FcGlobe",
|
||||||
"RequiredPermissionName": null,
|
"RequiredPermissionName": null,
|
||||||
|
|
@ -6025,6 +6035,36 @@
|
||||||
"RequiredPermissionName": "App.Languages.LanguageText",
|
"RequiredPermissionName": "App.Languages.LanguageText",
|
||||||
"IsDisabled": false
|
"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",
|
"ParentCode": "App.Administration",
|
||||||
"Code": "Abp.Identity",
|
"Code": "Abp.Identity",
|
||||||
|
|
@ -6039,7 +6079,7 @@
|
||||||
"ParentCode": "Abp.Identity",
|
"ParentCode": "Abp.Identity",
|
||||||
"Code": "Abp.Identity.PermissionGroups",
|
"Code": "Abp.Identity.PermissionGroups",
|
||||||
"DisplayName": "Abp.Identity.PermissionGroups",
|
"DisplayName": "Abp.Identity.PermissionGroups",
|
||||||
"Order": 0,
|
"Order": 1,
|
||||||
"Url": "/list/List-0017",
|
"Url": "/list/List-0017",
|
||||||
"Icon": "FcEngineering",
|
"Icon": "FcEngineering",
|
||||||
"RequiredPermissionName": "Abp.Identity.PermissionGroups",
|
"RequiredPermissionName": "Abp.Identity.PermissionGroups",
|
||||||
|
|
@ -6049,7 +6089,7 @@
|
||||||
"ParentCode": "Abp.Identity",
|
"ParentCode": "Abp.Identity",
|
||||||
"Code": "Abp.Identity.Permissions",
|
"Code": "Abp.Identity.Permissions",
|
||||||
"DisplayName": "Abp.Identity.Permissions",
|
"DisplayName": "Abp.Identity.Permissions",
|
||||||
"Order": 1,
|
"Order": 2,
|
||||||
"Url": "/list/List-0002",
|
"Url": "/list/List-0002",
|
||||||
"Icon": "FcSupport",
|
"Icon": "FcSupport",
|
||||||
"RequiredPermissionName": "Abp.Identity.Permissions",
|
"RequiredPermissionName": "Abp.Identity.Permissions",
|
||||||
|
|
@ -6059,7 +6099,7 @@
|
||||||
"ParentCode": "Abp.Identity",
|
"ParentCode": "Abp.Identity",
|
||||||
"Code": "AbpIdentity.Roles",
|
"Code": "AbpIdentity.Roles",
|
||||||
"DisplayName": "AbpIdentity.Roles",
|
"DisplayName": "AbpIdentity.Roles",
|
||||||
"Order": 2,
|
"Order": 3,
|
||||||
"Url": "/list/List-0003",
|
"Url": "/list/List-0003",
|
||||||
"Icon": "FcFlowChart",
|
"Icon": "FcFlowChart",
|
||||||
"RequiredPermissionName": "AbpIdentity.Roles",
|
"RequiredPermissionName": "AbpIdentity.Roles",
|
||||||
|
|
@ -6069,57 +6109,57 @@
|
||||||
"ParentCode": "Abp.Identity",
|
"ParentCode": "Abp.Identity",
|
||||||
"Code": "AbpIdentity.Users",
|
"Code": "AbpIdentity.Users",
|
||||||
"DisplayName": "AbpIdentity.Users",
|
"DisplayName": "AbpIdentity.Users",
|
||||||
"Order": 3,
|
"Order": 4,
|
||||||
"Url": "/list/List-0004",
|
"Url": "/list/List-0004",
|
||||||
"Icon": "FcBusinessman",
|
"Icon": "FcBusinessman",
|
||||||
"RequiredPermissionName": "AbpIdentity.Users",
|
"RequiredPermissionName": "AbpIdentity.Users",
|
||||||
"IsDisabled": false
|
"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",
|
"ParentCode": "Abp.Identity",
|
||||||
"Code": "Abp.Identity.OrganizationUnits",
|
"Code": "Abp.Identity.OrganizationUnits",
|
||||||
"DisplayName": "Abp.Identity.OrganizationUnits",
|
"DisplayName": "Abp.Identity.OrganizationUnits",
|
||||||
"Order": 4,
|
"Order": 5,
|
||||||
"Url": "/admin/ous",
|
"Url": "/admin/ous",
|
||||||
"Icon": "FcOrganization",
|
"Icon": "FcOrganization",
|
||||||
"RequiredPermissionName": "Abp.Identity.OrganizationUnits",
|
"RequiredPermissionName": "Abp.Identity.OrganizationUnits",
|
||||||
"IsDisabled": false
|
"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",
|
"ParentCode": "Abp.Identity",
|
||||||
"Code": "App.IpRestrictions",
|
"Code": "App.IpRestrictions",
|
||||||
"DisplayName": "App.IpRestrictions",
|
"DisplayName": "App.IpRestrictions",
|
||||||
"Order": 5,
|
"Order": 7,
|
||||||
"Url": "/list/List-0015",
|
"Url": "/list/List-0015",
|
||||||
"Icon": "FcNfcSign",
|
"Icon": "FcNfcSign",
|
||||||
"RequiredPermissionName": "App.IpRestrictions",
|
"RequiredPermissionName": "App.IpRestrictions",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.Administration",
|
"ParentCode": "AbpIdentity.Users",
|
||||||
"Code": "App.Menus",
|
"Code": "AbpIdentity.Users.SecurityLog",
|
||||||
"DisplayName": "App.Menus",
|
"DisplayName": "AbpIdentity.Users.SecurityLog",
|
||||||
"Order": 3,
|
"Order": 8,
|
||||||
"Url": "/list/List-0007",
|
"Url": "/list/List-0019",
|
||||||
"Icon": "FcMenu",
|
"Icon": "FcPrivacy",
|
||||||
"RequiredPermissionName": "App.Menus",
|
"RequiredPermissionName": "AbpIdentity.Users.SecurityLog",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.Administration",
|
"ParentCode": "App.Saas",
|
||||||
"Code": "App.Listforms",
|
"Code": "App.Listforms",
|
||||||
"DisplayName": "App.Listforms",
|
"DisplayName": "App.Listforms",
|
||||||
"Order": 4,
|
"Order": 6,
|
||||||
"Url": null,
|
"Url": null,
|
||||||
"Icon": "FcList",
|
"Icon": "FcList",
|
||||||
"RequiredPermissionName": null,
|
"RequiredPermissionName": null,
|
||||||
|
|
@ -6129,7 +6169,7 @@
|
||||||
"ParentCode": "App.Listforms",
|
"ParentCode": "App.Listforms",
|
||||||
"Code": "App.Listforms.DataSource",
|
"Code": "App.Listforms.DataSource",
|
||||||
"DisplayName": "App.Listforms.DataSource",
|
"DisplayName": "App.Listforms.DataSource",
|
||||||
"Order": 0,
|
"Order": 1,
|
||||||
"Url": "/list/List-0011",
|
"Url": "/list/List-0011",
|
||||||
"Icon": "FcAcceptDatabase",
|
"Icon": "FcAcceptDatabase",
|
||||||
"RequiredPermissionName": "App.Listforms.DataSource",
|
"RequiredPermissionName": "App.Listforms.DataSource",
|
||||||
|
|
@ -6139,7 +6179,7 @@
|
||||||
"ParentCode": "App.Listforms",
|
"ParentCode": "App.Listforms",
|
||||||
"Code": "App.Listforms.Wizard",
|
"Code": "App.Listforms.Wizard",
|
||||||
"DisplayName": "App.Listforms.Wizard",
|
"DisplayName": "App.Listforms.Wizard",
|
||||||
"Order": 1,
|
"Order": 2,
|
||||||
"Url": "/admin/listform/wizard",
|
"Url": "/admin/listform/wizard",
|
||||||
"Icon": "FcFlashAuto",
|
"Icon": "FcFlashAuto",
|
||||||
"RequiredPermissionName": "App.Listforms.Wizard",
|
"RequiredPermissionName": "App.Listforms.Wizard",
|
||||||
|
|
@ -6149,7 +6189,7 @@
|
||||||
"ParentCode": "App.Listforms",
|
"ParentCode": "App.Listforms",
|
||||||
"Code": "App.Listforms.Listform",
|
"Code": "App.Listforms.Listform",
|
||||||
"DisplayName": "App.Listforms.Listform",
|
"DisplayName": "App.Listforms.Listform",
|
||||||
"Order": 2,
|
"Order": 3,
|
||||||
"Url": "/list/List-0008",
|
"Url": "/list/List-0008",
|
||||||
"Icon": "FcDataSheet",
|
"Icon": "FcDataSheet",
|
||||||
"RequiredPermissionName": "App.Listforms.Listform",
|
"RequiredPermissionName": "App.Listforms.Listform",
|
||||||
|
|
@ -6159,17 +6199,17 @@
|
||||||
"ParentCode": "App.Listforms",
|
"ParentCode": "App.Listforms",
|
||||||
"Code": "App.Listforms.Chart",
|
"Code": "App.Listforms.Chart",
|
||||||
"DisplayName": "App.Listforms.Chart",
|
"DisplayName": "App.Listforms.Chart",
|
||||||
"Order": 3,
|
"Order": 4,
|
||||||
"Url": "/list/List-0010",
|
"Url": "/list/List-0010",
|
||||||
"Icon": "FcTodoList",
|
"Icon": "FcTodoList",
|
||||||
"RequiredPermissionName": "App.Listforms.Chart",
|
"RequiredPermissionName": "App.Listforms.Chart",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.Administration",
|
"ParentCode": "App.Saas",
|
||||||
"Code": "App.Notifications",
|
"Code": "App.Notifications",
|
||||||
"DisplayName": "App.Notifications",
|
"DisplayName": "App.Notifications",
|
||||||
"Order": 5,
|
"Order": 7,
|
||||||
"Url": null,
|
"Url": null,
|
||||||
"Icon": "FcWorkflow",
|
"Icon": "FcWorkflow",
|
||||||
"RequiredPermissionName": null,
|
"RequiredPermissionName": null,
|
||||||
|
|
@ -6196,20 +6236,20 @@
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.Administration",
|
"ParentCode": "App.Saas",
|
||||||
"Code": "App.BackgroundWorkers",
|
"Code": "App.BackgroundWorkers",
|
||||||
"DisplayName": "App.BackgroundWorkers",
|
"DisplayName": "App.BackgroundWorkers",
|
||||||
"Order": 6,
|
"Order": 8,
|
||||||
"Url": "/list/List-0012",
|
"Url": "/list/List-0012",
|
||||||
"Icon": "FcWorkflow",
|
"Icon": "FcWorkflow",
|
||||||
"RequiredPermissionName": "App.BackgroundWorkers",
|
"RequiredPermissionName": "App.BackgroundWorkers",
|
||||||
"IsDisabled": false
|
"IsDisabled": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ParentCode": "App.Administration",
|
"ParentCode": "App.Saas",
|
||||||
"Code": "App.PublicApis",
|
"Code": "App.PublicApis",
|
||||||
"DisplayName": "App.PublicApis",
|
"DisplayName": "App.PublicApis",
|
||||||
"Order": 7,
|
"Order": 9,
|
||||||
"Url": "/list/List-0016",
|
"Url": "/list/List-0016",
|
||||||
"Icon": "FcMindMap",
|
"Icon": "FcMindMap",
|
||||||
"RequiredPermissionName": "App.PublicApis",
|
"RequiredPermissionName": "App.PublicApis",
|
||||||
|
|
@ -6219,7 +6259,7 @@
|
||||||
"ParentCode": "App.Administration",
|
"ParentCode": "App.Administration",
|
||||||
"Code": "App.AuditLogs",
|
"Code": "App.AuditLogs",
|
||||||
"DisplayName": "App.AuditLogs",
|
"DisplayName": "App.AuditLogs",
|
||||||
"Order": 8,
|
"Order": 3,
|
||||||
"Url": "/list/List-0020",
|
"Url": "/list/List-0020",
|
||||||
"Icon": "FcMultipleInputs",
|
"Icon": "FcMultipleInputs",
|
||||||
"RequiredPermissionName": "App.AuditLogs",
|
"RequiredPermissionName": "App.AuditLogs",
|
||||||
|
|
@ -6227,61 +6267,61 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"PermissionGroupDefinitionRecords": [
|
"PermissionGroupDefinitionRecords": [
|
||||||
{
|
|
||||||
"Name": "AbpTenantManagement",
|
|
||||||
"DisplayName": "AbpTenantManagement"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "AbpIdentity",
|
|
||||||
"DisplayName": "AbpIdentity"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"Name": "App.Platform",
|
"Name": "App.Platform",
|
||||||
"DisplayName": "App.Platform"
|
"DisplayName": "App.Platform"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "App.Setting",
|
"Name": "AbpTenantManagement",
|
||||||
"DisplayName": "App.Setting"
|
"DisplayName": "AbpTenantManagement"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "App.Languages",
|
"Name": "App.Branches",
|
||||||
"DisplayName": "App.Languages"
|
"DisplayName": "App.Branches"
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "App.Listforms",
|
|
||||||
"DisplayName": "App.Listforms"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "App.Menus",
|
|
||||||
"DisplayName": "App.Menus"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "App.Settings.SettingDefinitions",
|
"Name": "App.Settings.SettingDefinitions",
|
||||||
"DisplayName": "App.Settings.SettingDefinitions"
|
"DisplayName": "App.Settings.SettingDefinitions"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "App.BackgroundWorkers",
|
"Name": "App.Settings.GlobalSearch",
|
||||||
"DisplayName": "App.BackgroundWorkers"
|
"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",
|
"Name": "App.Notifications",
|
||||||
"DisplayName": "App.Notifications"
|
"DisplayName": "App.Notifications"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Name": "App.BackgroundWorkers",
|
||||||
|
"DisplayName": "App.BackgroundWorkers"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Name": "App.PublicApis",
|
"Name": "App.PublicApis",
|
||||||
"DisplayName": "App.PublicApis"
|
"DisplayName": "App.PublicApis"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "App.Settings.GlobalSearch",
|
"Name": "App.Setting",
|
||||||
"DisplayName": "App.Settings.GlobalSearch"
|
"DisplayName": "App.Setting"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name": "AbpIdentity",
|
||||||
|
"DisplayName": "AbpIdentity"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "App.AuditLogs",
|
"Name": "App.AuditLogs",
|
||||||
"DisplayName": "App.AuditLogs"
|
"DisplayName": "App.AuditLogs"
|
||||||
},
|
|
||||||
{
|
|
||||||
"Name": "App.Branches",
|
|
||||||
"DisplayName": "App.Branches"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"PermissionDefinitionRecords": [
|
"PermissionDefinitionRecords": [
|
||||||
|
|
@ -6341,6 +6381,14 @@
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 3
|
"MultiTenancySide": 3
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"GroupName": "AbpIdentity",
|
||||||
|
"Name": "AbpIdentity.Users.ClaimType",
|
||||||
|
"ParentName": null,
|
||||||
|
"DisplayName": "AbpIdentity.Users.ClaimType",
|
||||||
|
"IsEnabled": true,
|
||||||
|
"MultiTenancySide": 3
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"GroupName": "AbpIdentity",
|
"GroupName": "AbpIdentity",
|
||||||
"Name": "App.IpRestrictions",
|
"Name": "App.IpRestrictions",
|
||||||
|
|
@ -6949,6 +6997,38 @@
|
||||||
"IsEnabled": true,
|
"IsEnabled": true,
|
||||||
"MultiTenancySide": 2
|
"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",
|
"GroupName": "AbpIdentity",
|
||||||
"Name": "App.IpRestrictions.Create",
|
"Name": "App.IpRestrictions.Create",
|
||||||
|
|
|
||||||
|
|
@ -327,7 +327,8 @@ public static class PlatformConsts
|
||||||
public const string GlobalSearch = "List-0018";
|
public const string GlobalSearch = "List-0018";
|
||||||
public const string SecurityLog = "List-0019";
|
public const string SecurityLog = "List-0019";
|
||||||
public const string AuditLog = "List-0020";
|
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 ListformField = "List-1000";
|
||||||
public const string Order = "List-Order";
|
public const string Order = "List-Order";
|
||||||
public const string Complaint = "List-Complaint";
|
public const string Complaint = "List-Complaint";
|
||||||
|
|
|
||||||
|
|
@ -319,6 +319,7 @@ public static class SeedConsts
|
||||||
{
|
{
|
||||||
public const string Default = GroupName + ".Users";
|
public const string Default = GroupName + ".Users";
|
||||||
public const string SecurityLogs = Default + ".SecurityLog";
|
public const string SecurityLogs = Default + ".SecurityLog";
|
||||||
|
public const string ClaimTypes = Default + ".ClaimType";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,10 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Net;
|
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Security.Principal;
|
using System.Security.Principal;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Web;
|
|
||||||
using Amazon.Runtime.Internal.Endpoints.StandardLibrary;
|
|
||||||
using Kurs.Platform.Extensions;
|
using Kurs.Platform.Extensions;
|
||||||
using Microsoft.AspNetCore.Identity;
|
using Microsoft.AspNetCore.Identity;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Microsoft.IdentityModel.Tokens;
|
|
||||||
using Volo.Abp.DependencyInjection;
|
using Volo.Abp.DependencyInjection;
|
||||||
using Volo.Abp.Identity;
|
using Volo.Abp.Identity;
|
||||||
using Volo.Abp.Security.Claims;
|
using Volo.Abp.Security.Claims;
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import {
|
||||||
IdentityUserDto,
|
IdentityUserDto,
|
||||||
PermissionDefinitionRecord,
|
PermissionDefinitionRecord,
|
||||||
UpdatePermissionsDto,
|
UpdatePermissionsDto,
|
||||||
|
UserClaimModel,
|
||||||
UserInfoViewModel,
|
UserInfoViewModel,
|
||||||
} from '@/proxy/admin'
|
} from '@/proxy/admin'
|
||||||
import apiService from '@/services/api.service'
|
import apiService from '@/services/api.service'
|
||||||
|
|
@ -72,3 +73,16 @@ export const getAuditLogs = (id: string) =>
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: `/api/app/audit-log/${id}`,
|
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[]
|
userRoleNames: string[]
|
||||||
roles: AssignedRoleViewModel[]
|
roles: AssignedRoleViewModel[]
|
||||||
branches: AssignedRoleViewModel[]
|
branches: AssignedRoleViewModel[]
|
||||||
|
claims: AssignedClaimViewModel[]
|
||||||
lockUser: boolean
|
lockUser: boolean
|
||||||
lastPasswordChangeTime?: Date | string
|
lastPasswordChangeTime?: Date | string
|
||||||
|
|
||||||
|
|
@ -144,3 +145,19 @@ export interface AssignedBranchViewModel {
|
||||||
name?: string
|
name?: string
|
||||||
isAssigned: boolean
|
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,
|
FormItem,
|
||||||
Input,
|
Input,
|
||||||
Notification,
|
Notification,
|
||||||
|
Select,
|
||||||
Tabs,
|
Tabs,
|
||||||
toast,
|
toast,
|
||||||
} from '@/components/ui'
|
} from '@/components/ui'
|
||||||
|
import Dialog from '@/components/ui/Dialog'
|
||||||
import DateTimepicker from '@/components/ui/DatePicker/DateTimepicker'
|
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 TabContent from '@/components/ui/Tabs/TabContent'
|
||||||
import TabList from '@/components/ui/Tabs/TabList'
|
import TabList from '@/components/ui/Tabs/TabList'
|
||||||
import TabNav from '@/components/ui/Tabs/TabNav'
|
import TabNav from '@/components/ui/Tabs/TabNav'
|
||||||
import { UserInfoViewModel } from '@/proxy/admin'
|
import { AssignedClaimViewModel, UserInfoViewModel } from '@/proxy/admin'
|
||||||
import { getUserDetail, putUserDetail, putUserLookout } from '@/proxy/admin/identity.service'
|
import {
|
||||||
|
deleteClaimUser,
|
||||||
|
getUserDetail,
|
||||||
|
postClaimUser,
|
||||||
|
putUserDetail,
|
||||||
|
putUserLookout,
|
||||||
|
} from '@/proxy/admin/identity.service'
|
||||||
import { useLocalization } from '@/utils/hooks/useLocalization'
|
import { useLocalization } from '@/utils/hooks/useLocalization'
|
||||||
import dayjs from 'dayjs'
|
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 { useEffect, useState } from 'react'
|
||||||
import { Helmet } from 'react-helmet'
|
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 { 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() {
|
function UserDetails() {
|
||||||
const { userId } = useParams()
|
const { userId } = useParams()
|
||||||
const { translate } = useLocalization()
|
const { translate } = useLocalization()
|
||||||
const [userDetails, setUserDetails] = useState<UserInfoViewModel>()
|
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 getUser = async () => {
|
||||||
const { data } = await getUserDetail(userId || '')
|
const { data } = await getUserDetail(userId || '')
|
||||||
|
|
||||||
setUserDetails(data)
|
setUserDetails(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,7 +63,45 @@ function UserDetails() {
|
||||||
getUser()
|
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 ? (
|
return userDetails ? (
|
||||||
<>
|
<>
|
||||||
<Helmet
|
<Helmet
|
||||||
|
|
@ -54,6 +117,9 @@ function UserDetails() {
|
||||||
<TabNav value="lockout" icon={<HiOutlineLockOpen />}>
|
<TabNav value="lockout" icon={<HiOutlineLockOpen />}>
|
||||||
{translate('::Abp.Identity.User.LockoutManagement')}
|
{translate('::Abp.Identity.User.LockoutManagement')}
|
||||||
</TabNav>
|
</TabNav>
|
||||||
|
<TabNav value="claimTypes" icon={<HiOutlineLockOpen />}>
|
||||||
|
{translate('::Abp.Identity.User.ClaimTypes')}
|
||||||
|
</TabNav>
|
||||||
</TabList>
|
</TabList>
|
||||||
<TabContent value="user">
|
<TabContent value="user">
|
||||||
<div className="mt-5">
|
<div className="mt-5">
|
||||||
|
|
@ -95,14 +161,23 @@ function UserDetails() {
|
||||||
|
|
||||||
{/* Personal Information */}
|
{/* Personal Information */}
|
||||||
<div>
|
<div>
|
||||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.Surname')}>
|
<FormItem
|
||||||
<Field type="text" name="surname" placeholder="Surname" component={Input} />
|
label={translate('::Abp.Identity.User.UserInformation.Surname')}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
name="surname"
|
||||||
|
placeholder="Surname"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Şube Management */}
|
{/* Şube Management */}
|
||||||
<div>
|
<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">
|
<div className="border-2 rounded-lg p-4">
|
||||||
<FieldArray name="branches">
|
<FieldArray name="branches">
|
||||||
{({ form, remove, push }) => (
|
{({ form, remove, push }) => (
|
||||||
|
|
@ -132,7 +207,9 @@ function UserDetails() {
|
||||||
|
|
||||||
{/* Role Management */}
|
{/* Role Management */}
|
||||||
<div>
|
<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">
|
<div className="border-2 rounded-lg p-4">
|
||||||
<FieldArray name="roles">
|
<FieldArray name="roles">
|
||||||
{({ form, remove, push }) => (
|
{({ form, remove, push }) => (
|
||||||
|
|
@ -162,22 +239,50 @@ function UserDetails() {
|
||||||
|
|
||||||
{/* Contact Information */}
|
{/* Contact Information */}
|
||||||
<div>
|
<div>
|
||||||
<h6 className="mb-4">{translate('::Abp.Identity.User.UserInformation.ContactInformation')}</h6>
|
<h6 className="mb-4">
|
||||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.EmailAddress')}>
|
{translate('::Abp.Identity.User.UserInformation.ContactInformation')}
|
||||||
<Field type="text" disabled name="email" placeholder="Email Address" component={Input} />
|
</h6>
|
||||||
|
<FormItem
|
||||||
|
label={translate('::Abp.Identity.User.UserInformation.EmailAddress')}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
disabled
|
||||||
|
name="email"
|
||||||
|
placeholder="Email Address"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.PhoneNumber')}>
|
<FormItem
|
||||||
<Field type="text" name="phoneNumber" placeholder="Phone Number" component={Input} />
|
label={translate('::Abp.Identity.User.UserInformation.PhoneNumber')}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
name="phoneNumber"
|
||||||
|
placeholder="Phone Number"
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label={translate('::RocketUsername')}>
|
<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>
|
</FormItem>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Account Timestamps */}
|
{/* Account Timestamps */}
|
||||||
<div>
|
<div>
|
||||||
<h6 className="mb-4">{translate('::Abp.Identity.User.UserInformation.AccountTimestamps')}</h6>
|
<h6 className="mb-4">
|
||||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.PasswordChangeTime')}>
|
{translate('::Abp.Identity.User.UserInformation.AccountTimestamps')}
|
||||||
|
</h6>
|
||||||
|
<FormItem
|
||||||
|
label={translate(
|
||||||
|
'::Abp.Identity.User.UserInformation.PasswordChangeTime',
|
||||||
|
)}
|
||||||
|
>
|
||||||
<Field name="lastPasswordChangeTime">
|
<Field name="lastPasswordChangeTime">
|
||||||
{({ field, form }: FieldProps) => (
|
{({ field, form }: FieldProps) => (
|
||||||
<DateTimepicker
|
<DateTimepicker
|
||||||
|
|
@ -195,25 +300,33 @@ function UserDetails() {
|
||||||
)}
|
)}
|
||||||
</Field>
|
</Field>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.CreateTime')}>
|
<FormItem
|
||||||
|
label={translate('::Abp.Identity.User.UserInformation.CreateTime')}
|
||||||
|
>
|
||||||
<Field name="creationTime">
|
<Field name="creationTime">
|
||||||
{({ field, form }: FieldProps) => (
|
{({ field, form }: FieldProps) => (
|
||||||
<Input
|
<Input
|
||||||
field={field}
|
field={field}
|
||||||
form={form}
|
form={form}
|
||||||
value={field.value ? dayjs(field.value).format('L LT') : undefined}
|
value={
|
||||||
|
field.value ? dayjs(field.value).format('L LT') : undefined
|
||||||
|
}
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Field>
|
</Field>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label={translate('::Abp.Identity.User.UserInformation.UpdateTime')}>
|
<FormItem
|
||||||
|
label={translate('::Abp.Identity.User.UserInformation.UpdateTime')}
|
||||||
|
>
|
||||||
<Field name="lastModificationTime">
|
<Field name="lastModificationTime">
|
||||||
{({ field, form }: FieldProps) => (
|
{({ field, form }: FieldProps) => (
|
||||||
<Input
|
<Input
|
||||||
field={field}
|
field={field}
|
||||||
form={form}
|
form={form}
|
||||||
value={field.value ? dayjs(field.value).format('L LT') : undefined}
|
value={
|
||||||
|
field.value ? dayjs(field.value).format('L LT') : undefined
|
||||||
|
}
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
@ -267,25 +380,37 @@ function UserDetails() {
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 w-full">
|
<div className="grid grid-cols-1 lg:grid-cols-2 gap-4 w-full">
|
||||||
{/* Account Status */}
|
{/* Account Status */}
|
||||||
<div>
|
<div>
|
||||||
<h6 className="mb-4">{translate('::Abp.Identity.User.LockoutManagement.AccountStatus')}</h6>
|
<h6 className="mb-4">
|
||||||
|
{translate('::Abp.Identity.User.LockoutManagement.AccountStatus')}
|
||||||
|
</h6>
|
||||||
<FormItem
|
<FormItem
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
labelClass="!justify-start"
|
labelClass="!justify-start"
|
||||||
labelWidth="50%"
|
labelWidth="50%"
|
||||||
label={translate('::Abp.Identity.User.LockoutManagement.Status')}
|
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>
|
||||||
|
|
||||||
<FormItem
|
<FormItem
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
labelClass="!justify-start"
|
labelClass="!justify-start"
|
||||||
labelWidth="50%"
|
labelWidth="50%"
|
||||||
label={translate('::Abp.Identity.User.LockoutManagement.AdminVerification')}
|
label={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.AdminVerification',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Field
|
<Field
|
||||||
name="isVerified"
|
name="isVerified"
|
||||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AdminVerification')}
|
placeholder={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.AdminVerification',
|
||||||
|
)}
|
||||||
component={Checkbox}
|
component={Checkbox}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -294,11 +419,15 @@ function UserDetails() {
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
labelClass="!justify-start"
|
labelClass="!justify-start"
|
||||||
labelWidth="50%"
|
labelWidth="50%"
|
||||||
label={translate('::Abp.Identity.User.LockoutManagement.EmailConfirmed')}
|
label={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.EmailConfirmed',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Field
|
<Field
|
||||||
name="emailConfirmed"
|
name="emailConfirmed"
|
||||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.EmailConfirmed')}
|
placeholder={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.EmailConfirmed',
|
||||||
|
)}
|
||||||
component={Checkbox}
|
component={Checkbox}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -307,11 +436,15 @@ function UserDetails() {
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
labelClass="!justify-start"
|
labelClass="!justify-start"
|
||||||
labelWidth="50%"
|
labelWidth="50%"
|
||||||
label={translate('::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed')}
|
label={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Field
|
<Field
|
||||||
name="phoneNumberConfirmed"
|
name="phoneNumberConfirmed"
|
||||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed')}
|
placeholder={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.PhoneNumberConfirmed',
|
||||||
|
)}
|
||||||
component={Checkbox}
|
component={Checkbox}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -320,11 +453,15 @@ function UserDetails() {
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
labelClass="!justify-start"
|
labelClass="!justify-start"
|
||||||
labelWidth="50%"
|
labelWidth="50%"
|
||||||
label={translate('::Abp.Identity.User.LockoutManagement.TwoFactorEnabled')}
|
label={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.TwoFactorEnabled',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Field
|
<Field
|
||||||
name="twoFactorEnabled"
|
name="twoFactorEnabled"
|
||||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.TwoFactorEnabled')}
|
placeholder={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.TwoFactorEnabled',
|
||||||
|
)}
|
||||||
component={Checkbox}
|
component={Checkbox}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -332,12 +469,18 @@ function UserDetails() {
|
||||||
|
|
||||||
{/* Login & Lockout Settings */}
|
{/* Login & Lockout Settings */}
|
||||||
<div>
|
<div>
|
||||||
<h6 className="mb-4">{translate('::Abp.Identity.User.LockoutManagement.LoginAndLockoutSettings')}</h6>
|
<h6 className="mb-4">
|
||||||
|
{translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.LoginAndLockoutSettings',
|
||||||
|
)}
|
||||||
|
</h6>
|
||||||
<FormItem
|
<FormItem
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
labelClass="!justify-start"
|
labelClass="!justify-start"
|
||||||
labelWidth="50%"
|
labelWidth="50%"
|
||||||
label={translate('::Abp.Identity.User.LockoutManagement.LoginEndDate')}
|
label={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.LoginEndDate',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Field name="loginEndDate">
|
<Field name="loginEndDate">
|
||||||
{({ field, form }: FieldProps) => (
|
{({ field, form }: FieldProps) => (
|
||||||
|
|
@ -345,7 +488,9 @@ function UserDetails() {
|
||||||
field={field}
|
field={field}
|
||||||
form={form}
|
form={form}
|
||||||
value={field.value ? dayjs(field.value).toDate() : null}
|
value={field.value ? dayjs(field.value).toDate() : null}
|
||||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.LoginEndDate')}
|
placeholder={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.LoginEndDate',
|
||||||
|
)}
|
||||||
onChange={(date) => {
|
onChange={(date) => {
|
||||||
form.setFieldValue(
|
form.setFieldValue(
|
||||||
field.name,
|
field.name,
|
||||||
|
|
@ -361,11 +506,15 @@ function UserDetails() {
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
labelClass="!justify-start"
|
labelClass="!justify-start"
|
||||||
labelWidth="50%"
|
labelWidth="50%"
|
||||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled')}
|
label={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Field
|
<Field
|
||||||
name="lockoutEnabled"
|
name="lockoutEnabled"
|
||||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled')}
|
placeholder={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.AccountLockoutEnabled',
|
||||||
|
)}
|
||||||
component={Checkbox}
|
component={Checkbox}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -374,11 +523,15 @@ function UserDetails() {
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
labelClass="!justify-start"
|
labelClass="!justify-start"
|
||||||
labelWidth="50%"
|
labelWidth="50%"
|
||||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountLocked')}
|
label={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.AccountLocked',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Field
|
<Field
|
||||||
name="lockUser"
|
name="lockUser"
|
||||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountLocked')}
|
placeholder={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.AccountLocked',
|
||||||
|
)}
|
||||||
component={Checkbox}
|
component={Checkbox}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -387,7 +540,9 @@ function UserDetails() {
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
labelClass="!justify-start"
|
labelClass="!justify-start"
|
||||||
labelWidth="50%"
|
labelWidth="50%"
|
||||||
label={translate('::Abp.Identity.User.LockoutManagement.AccountEndDate')}
|
label={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.AccountEndDate',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Field name="lockoutEnd">
|
<Field name="lockoutEnd">
|
||||||
{({ field, form }: FieldProps) => (
|
{({ field, form }: FieldProps) => (
|
||||||
|
|
@ -395,7 +550,9 @@ function UserDetails() {
|
||||||
field={field}
|
field={field}
|
||||||
form={form}
|
form={form}
|
||||||
value={field.value ? dayjs(field.value).toDate() : null}
|
value={field.value ? dayjs(field.value).toDate() : null}
|
||||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.AccountEndDate')}
|
placeholder={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.AccountEndDate',
|
||||||
|
)}
|
||||||
onChange={(date) => {
|
onChange={(date) => {
|
||||||
form.setFieldValue(
|
form.setFieldValue(
|
||||||
field.name,
|
field.name,
|
||||||
|
|
@ -411,11 +568,15 @@ function UserDetails() {
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
labelClass="!justify-start"
|
labelClass="!justify-start"
|
||||||
labelWidth="50%"
|
labelWidth="50%"
|
||||||
label={translate('::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin')}
|
label={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Field
|
<Field
|
||||||
name="shouldChangePasswordOnNextLogin"
|
name="shouldChangePasswordOnNextLogin"
|
||||||
placeholder={translate('::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin')}
|
placeholder={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.ShouldChangePwOnNextLogin',
|
||||||
|
)}
|
||||||
component={Checkbox}
|
component={Checkbox}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -424,7 +585,9 @@ function UserDetails() {
|
||||||
layout="horizontal"
|
layout="horizontal"
|
||||||
labelClass="!justify-start"
|
labelClass="!justify-start"
|
||||||
labelWidth="50%"
|
labelWidth="50%"
|
||||||
label={translate('::Abp.Identity.User.LockoutManagement.AccessFailedCount')}
|
label={translate(
|
||||||
|
'::Abp.Identity.User.LockoutManagement.AccessFailedCount',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<Field type="number" name="accessFailedCount" component={Input} />
|
<Field type="number" name="accessFailedCount" component={Input} />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
@ -444,7 +607,145 @@ function UserDetails() {
|
||||||
</Formik>
|
</Formik>
|
||||||
</div>
|
</div>
|
||||||
</TabContent>
|
</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>
|
</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