verben-authentication-ui 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4833,22 +4833,22 @@ class RoleControlComponent {
|
|
|
4833
4833
|
});
|
|
4834
4834
|
}
|
|
4835
4835
|
async getSavedContexts() {
|
|
4836
|
-
if (!this.isGlobal || !this.
|
|
4836
|
+
if (!this.isGlobal || !this.application) {
|
|
4837
4837
|
return undefined;
|
|
4838
4838
|
}
|
|
4839
4839
|
var payload = [
|
|
4840
4840
|
{
|
|
4841
|
-
PropertyName: '
|
|
4842
|
-
EntityValue: this.
|
|
4843
|
-
Operator: SearchOperator.And,
|
|
4844
|
-
Sign: SearchPropertySign.EQ,
|
|
4845
|
-
},
|
|
4846
|
-
{
|
|
4847
|
-
PropertyName: 'APIKey',
|
|
4848
|
-
EntityValue: this.envSvc.environment.APIKey,
|
|
4841
|
+
PropertyName: 'Application',
|
|
4842
|
+
EntityValue: this.application,
|
|
4849
4843
|
Operator: SearchOperator.And,
|
|
4850
4844
|
Sign: SearchPropertySign.EQ,
|
|
4851
4845
|
},
|
|
4846
|
+
// {
|
|
4847
|
+
// PropertyName: 'APIKey',
|
|
4848
|
+
// EntityValue: this.envSvc.environment.APIKey,
|
|
4849
|
+
// Operator: SearchOperator.And,
|
|
4850
|
+
// Sign: SearchPropertySign.EQ,
|
|
4851
|
+
// },
|
|
4852
4852
|
];
|
|
4853
4853
|
this.utilService.sendBI(true);
|
|
4854
4854
|
const res = await this.server.post(`Application/SearchApplicationRoleContexts/0/0`, payload);
|
|
@@ -4940,7 +4940,7 @@ class RoleControlComponent {
|
|
|
4940
4940
|
this.data = data.map((x) => {
|
|
4941
4941
|
return {
|
|
4942
4942
|
...x,
|
|
4943
|
-
|
|
4943
|
+
Id: x.Code,
|
|
4944
4944
|
ChildrenType: ChildrenType.Permission,
|
|
4945
4945
|
RoleContexts: this.sourceData.map((config) => {
|
|
4946
4946
|
const existingId = x.RoleContexts.findIndex((y) => y.Name == config.Name);
|
|
@@ -4957,10 +4957,10 @@ class RoleControlComponent {
|
|
|
4957
4957
|
Role: x.Code,
|
|
4958
4958
|
Context: '',
|
|
4959
4959
|
id: existingAction > -1
|
|
4960
|
-
? x.RoleContexts[existingId].RoleActions[existingAction].
|
|
4960
|
+
? x.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
4961
4961
|
: '',
|
|
4962
4962
|
Id: existingAction > -1
|
|
4963
|
-
? x.RoleContexts[existingId].RoleActions[existingAction].
|
|
4963
|
+
? x.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
4964
4964
|
: '',
|
|
4965
4965
|
CreatedAt: new Date(),
|
|
4966
4966
|
UpdatedAt: new Date(),
|
|
@@ -4984,8 +4984,8 @@ class RoleControlComponent {
|
|
|
4984
4984
|
}),
|
|
4985
4985
|
Name: config.Name,
|
|
4986
4986
|
Role: x.Code,
|
|
4987
|
-
id: existingId > -1 ? x.RoleContexts[existingId].
|
|
4988
|
-
Id: existingId > -1 ? x.RoleContexts[existingId].
|
|
4987
|
+
id: existingId > -1 ? x.RoleContexts[existingId].Code : '',
|
|
4988
|
+
Id: existingId > -1 ? x.RoleContexts[existingId].Code : '',
|
|
4989
4989
|
CreatedAt: new Date(),
|
|
4990
4990
|
UpdatedAt: new Date(),
|
|
4991
4991
|
DataState: ObjectState.New,
|
|
@@ -5006,7 +5006,7 @@ class RoleControlComponent {
|
|
|
5006
5006
|
return data.map((x) => {
|
|
5007
5007
|
return {
|
|
5008
5008
|
...x,
|
|
5009
|
-
|
|
5009
|
+
Id: x.Code,
|
|
5010
5010
|
ChildrenType: ChildrenType.Permission,
|
|
5011
5011
|
RoleContexts: this.sourceData.map((config) => {
|
|
5012
5012
|
const existingId = x.RoleContexts.findIndex((y) => y.Name == config.Name);
|
|
@@ -5023,10 +5023,10 @@ class RoleControlComponent {
|
|
|
5023
5023
|
Role: x.Code,
|
|
5024
5024
|
Context: '',
|
|
5025
5025
|
id: existingAction > -1
|
|
5026
|
-
? x.RoleContexts[existingId].RoleActions[existingAction].
|
|
5026
|
+
? x.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
5027
5027
|
: '',
|
|
5028
5028
|
Id: existingAction > -1
|
|
5029
|
-
? x.RoleContexts[existingId].RoleActions[existingAction].
|
|
5029
|
+
? x.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
5030
5030
|
: '',
|
|
5031
5031
|
CreatedAt: new Date(),
|
|
5032
5032
|
UpdatedAt: new Date(),
|
|
@@ -5050,8 +5050,8 @@ class RoleControlComponent {
|
|
|
5050
5050
|
}),
|
|
5051
5051
|
Name: config.Name,
|
|
5052
5052
|
Role: x.Code,
|
|
5053
|
-
id: existingId > -1 ? x.RoleContexts[existingId].
|
|
5054
|
-
Id: existingId > -1 ? x.RoleContexts[existingId].
|
|
5053
|
+
id: existingId > -1 ? x.RoleContexts[existingId].Code : '',
|
|
5054
|
+
Id: existingId > -1 ? x.RoleContexts[existingId].Code : '',
|
|
5055
5055
|
CreatedAt: new Date(),
|
|
5056
5056
|
UpdatedAt: new Date(),
|
|
5057
5057
|
DataState: ObjectState.New,
|
|
@@ -5134,6 +5134,8 @@ class RoleControlComponent {
|
|
|
5134
5134
|
}
|
|
5135
5135
|
viewDetailsFromTable(data) {
|
|
5136
5136
|
const cardData = this.cardData.find((x) => x.data == data);
|
|
5137
|
+
console.log({ Data: data });
|
|
5138
|
+
console.log({ CardData: this.cardData });
|
|
5137
5139
|
if (cardData) {
|
|
5138
5140
|
this.viewDetails(cardData);
|
|
5139
5141
|
}
|
|
@@ -5179,7 +5181,7 @@ class RoleControlComponent {
|
|
|
5179
5181
|
return;
|
|
5180
5182
|
}
|
|
5181
5183
|
this.dataView.toggleView();
|
|
5182
|
-
const id = this.currentData.data ? this.currentData.data.
|
|
5184
|
+
const id = this.currentData.data ? this.currentData.data.Code : '';
|
|
5183
5185
|
if (id.trim().length > 0 && !this.tableView.isRowEditing(id)) {
|
|
5184
5186
|
this.tableView.toggleRowEdit(id);
|
|
5185
5187
|
}
|
|
@@ -5210,7 +5212,7 @@ class RoleControlComponent {
|
|
|
5210
5212
|
newRole.DataState == ObjectState.New
|
|
5211
5213
|
? ObjectState.New
|
|
5212
5214
|
: ObjectState.Changed;
|
|
5213
|
-
newRole.Id =
|
|
5215
|
+
newRole.Id = '';
|
|
5214
5216
|
return newRole;
|
|
5215
5217
|
}
|
|
5216
5218
|
async saveRole() {
|
|
@@ -5250,10 +5252,10 @@ class RoleControlComponent {
|
|
|
5250
5252
|
Role: roleResult.Code,
|
|
5251
5253
|
Context: '',
|
|
5252
5254
|
id: existingAction > -1
|
|
5253
|
-
? roleResult.RoleContexts[existingId].RoleActions[existingAction].
|
|
5255
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
5254
5256
|
: '',
|
|
5255
5257
|
Id: existingAction > -1
|
|
5256
|
-
? roleResult.RoleContexts[existingId].RoleActions[existingAction].
|
|
5258
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
5257
5259
|
: '',
|
|
5258
5260
|
CreatedAt: new Date(),
|
|
5259
5261
|
UpdatedAt: new Date(),
|
|
@@ -5274,8 +5276,8 @@ class RoleControlComponent {
|
|
|
5274
5276
|
}),
|
|
5275
5277
|
Name: config.Name,
|
|
5276
5278
|
Role: roleResult.Code,
|
|
5277
|
-
id: existingId > -1 ? roleResult.RoleContexts[existingId].
|
|
5278
|
-
Id: existingId > -1 ? roleResult.RoleContexts[existingId].
|
|
5279
|
+
id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
5280
|
+
Id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
5279
5281
|
CreatedAt: new Date(),
|
|
5280
5282
|
UpdatedAt: new Date(),
|
|
5281
5283
|
DataState: ObjectState.New,
|
|
@@ -5297,7 +5299,7 @@ class RoleControlComponent {
|
|
|
5297
5299
|
const itemIndex = this.data.findIndex((x) => x == this.currentData?.data);
|
|
5298
5300
|
if (itemIndex > -1) {
|
|
5299
5301
|
this.data[itemIndex].Code = mappedRoleSave.Code;
|
|
5300
|
-
this.data[itemIndex].Id = mappedRoleSave.
|
|
5302
|
+
this.data[itemIndex].Id = mappedRoleSave.Code;
|
|
5301
5303
|
this.data[itemIndex].DataState = mappedRoleSave.DataState;
|
|
5302
5304
|
this.data[itemIndex].TenantId = mappedRoleSave.TenantId;
|
|
5303
5305
|
this.data[itemIndex].ServiceName = mappedRoleSave.ServiceName;
|
|
@@ -5377,10 +5379,10 @@ class RoleControlComponent {
|
|
|
5377
5379
|
Role: roleResult.Code,
|
|
5378
5380
|
Context: '',
|
|
5379
5381
|
id: existingAction > -1
|
|
5380
|
-
? roleResult.RoleContexts[existingId].RoleActions[existingAction].
|
|
5382
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
5381
5383
|
: '',
|
|
5382
5384
|
Id: existingAction > -1
|
|
5383
|
-
? roleResult.RoleContexts[existingId].RoleActions[existingAction].
|
|
5385
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
5384
5386
|
: '',
|
|
5385
5387
|
CreatedAt: new Date(),
|
|
5386
5388
|
UpdatedAt: new Date(),
|
|
@@ -5401,8 +5403,8 @@ class RoleControlComponent {
|
|
|
5401
5403
|
}),
|
|
5402
5404
|
Name: config.Name,
|
|
5403
5405
|
Role: roleResult.Code,
|
|
5404
|
-
id: existingId > -1 ? roleResult.RoleContexts[existingId].
|
|
5405
|
-
Id: existingId > -1 ? roleResult.RoleContexts[existingId].
|
|
5406
|
+
id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
5407
|
+
Id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
5406
5408
|
CreatedAt: new Date(),
|
|
5407
5409
|
UpdatedAt: new Date(),
|
|
5408
5410
|
DataState: ObjectState.New,
|
|
@@ -5422,7 +5424,7 @@ class RoleControlComponent {
|
|
|
5422
5424
|
const itemIndex = this.data.findIndex((x) => x == this.currentData?.data);
|
|
5423
5425
|
if (itemIndex > -1) {
|
|
5424
5426
|
this.data[itemIndex].Code = mappedRoleSave.Code;
|
|
5425
|
-
this.data[itemIndex].Id = mappedRoleSave.
|
|
5427
|
+
this.data[itemIndex].Id = mappedRoleSave.Code;
|
|
5426
5428
|
this.data[itemIndex].DataState = mappedRoleSave.DataState;
|
|
5427
5429
|
this.data[itemIndex].TenantId = mappedRoleSave.TenantId;
|
|
5428
5430
|
this.data[itemIndex].ServiceName = mappedRoleSave.ServiceName;
|
|
@@ -5504,10 +5506,10 @@ class RoleControlComponent {
|
|
|
5504
5506
|
Role: roleResult.Code,
|
|
5505
5507
|
Context: '',
|
|
5506
5508
|
id: existingAction > -1
|
|
5507
|
-
? roleResult.RoleContexts[existingId].RoleActions[existingAction].
|
|
5509
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
5508
5510
|
: '',
|
|
5509
5511
|
Id: existingAction > -1
|
|
5510
|
-
? roleResult.RoleContexts[existingId].RoleActions[existingAction].
|
|
5512
|
+
? roleResult.RoleContexts[existingId].RoleActions[existingAction].Code
|
|
5511
5513
|
: '',
|
|
5512
5514
|
CreatedAt: new Date(),
|
|
5513
5515
|
UpdatedAt: new Date(),
|
|
@@ -5528,8 +5530,8 @@ class RoleControlComponent {
|
|
|
5528
5530
|
}),
|
|
5529
5531
|
Name: config.Name,
|
|
5530
5532
|
Role: roleResult.Code,
|
|
5531
|
-
id: existingId > -1 ? roleResult.RoleContexts[existingId].
|
|
5532
|
-
Id: existingId > -1 ? roleResult.RoleContexts[existingId].
|
|
5533
|
+
id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
5534
|
+
Id: existingId > -1 ? roleResult.RoleContexts[existingId].Code : '',
|
|
5533
5535
|
CreatedAt: new Date(),
|
|
5534
5536
|
UpdatedAt: new Date(),
|
|
5535
5537
|
DataState: ObjectState.New,
|
|
@@ -5551,7 +5553,7 @@ class RoleControlComponent {
|
|
|
5551
5553
|
: -1;
|
|
5552
5554
|
if (itemIndex > -1) {
|
|
5553
5555
|
this.data[itemIndex].Code = mappedRoleSave.Code;
|
|
5554
|
-
this.data[itemIndex].Id = mappedRoleSave.
|
|
5556
|
+
this.data[itemIndex].Id = mappedRoleSave.Code;
|
|
5555
5557
|
this.data[itemIndex].DataState = mappedRoleSave.DataState;
|
|
5556
5558
|
this.data[itemIndex].TenantId = mappedRoleSave.TenantId;
|
|
5557
5559
|
this.data[itemIndex].ServiceName = mappedRoleSave.ServiceName;
|