Skip to content

Commit fe5957a

Browse files
NVSHAS-9986: Process profile rules and File access rules cannot be edited and removed in Federated policy group view
1 parent d3670c9 commit fe5957a

File tree

5 files changed

+11
-43
lines changed

5 files changed

+11
-43
lines changed

admin/webapp/websrc/app/common/services/file-access-rules.service.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,6 @@ export class FileAccessRulesService {
3737
},
3838
];
3939
const filterPrefix = [
40-
{
41-
headerName: this.translate.instant('group.GROUP'),
42-
// headerCheckboxSelection: function(params) {
43-
// console.log("Header: ", $scope.selectedGroup, params);
44-
// return $scope.isWriteRuleAuthorized && $scope.selectedGroup;
45-
// },
46-
// headerCheckboxSelectionFilteredOnly: true,
47-
// checkboxSelection: function(params) {
48-
// console.log("Rows: ", $scope.selectedGroup);
49-
// return $scope.isWriteRuleAuthorized && $scope.selectedGroup;
50-
// },
51-
field: 'group',
52-
filter: 'agTextColumnFilter',
53-
hide: source === GlobalConstant.NAV_SOURCE.GROUP,
54-
},
5540
...filterColumn,
5641
{
5742
headerName: this.translate.instant('service.gridHeader.RECURSIVE'),

admin/webapp/websrc/app/common/services/process-profile-rules.service.ts

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ export class ProcessProfileRulesService {
3131
source: string,
3232
isScoreImprovement: boolean = false
3333
) {
34+
const groupConfigurableCfgTypes = source === GlobalConstant.NAV_SOURCE.GROUP?
35+
[
36+
GlobalConstant.CFG_TYPE.CUSTOMER,
37+
GlobalConstant.CFG_TYPE.LEARNED,
38+
] :
39+
[GlobalConstant.CFG_TYPE.FED];
3440
let columnDefs = [
35-
{
36-
headerName: this.translate.instant('group.GROUP'),
37-
field: 'group',
38-
filter: 'agTextColumnFilter',
39-
hide: source === GlobalConstant.NAV_SOURCE.GROUP,
40-
},
4141
{
4242
headerComponent: ProcessProfileRuleNameHeaderComponent,
4343
headerCheckboxSelection: params => {
@@ -48,27 +48,15 @@ export class ProcessProfileRulesService {
4848
return (
4949
isWriteGroupAuthorized &&
5050
isWriteProcessProfileRuleAuthorized &&
51-
[
52-
GlobalConstant.CFG_TYPE.CUSTOMER,
53-
GlobalConstant.CFG_TYPE.LEARNED,
54-
].includes(params.data.cfg_type)
51+
groupConfigurableCfgTypes.includes(params.data.cfg_type)
5552
);
5653
},
5754
field: 'name',
5855
hide: !(
59-
source === GlobalConstant.NAV_SOURCE.GROUP &&
6056
isWriteGroupAuthorized &&
6157
isWriteProcessProfileRuleAuthorized
6258
),
6359
},
64-
{
65-
headerComponent: ProcessProfileRuleNameHeaderComponent,
66-
field: 'name',
67-
hide:
68-
source === GlobalConstant.NAV_SOURCE.GROUP &&
69-
isWriteGroupAuthorized &&
70-
isWriteProcessProfileRuleAuthorized,
71-
},
7260
{
7361
headerName: this.translate.instant('service.gridHeader.PATH'),
7462
field: 'path',

admin/webapp/websrc/app/routes/components/file-access-rules/file-access-rules.component.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,7 @@ export class FileAccessRulesComponent implements OnInit, OnChanges {
248248
return this.fileAccessRulesService.updateFileAccessRuleList(
249249
GlobalConstant.CRUD.D,
250250
this.selectedFileAccessRules,
251-
this.source === GlobalConstant.NAV_SOURCE.FED_POLICY
252-
? data.group
253-
: this.groupName
251+
this.groupName
254252
);
255253
})
256254
)

admin/webapp/websrc/app/routes/components/process-profile-rules/partial/add-edit-process-profile-rule-modal/add-edit-process-profile-rule-modal.component.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@ export class AddEditProcessProfileRuleModalComponent implements OnInit {
7979
if (this.type === GlobalConstant.MODAL_OP.ADD) {
8080
this.processProfileRuleForm.reset();
8181
} else {
82-
this.oldData =
83-
this.data.source === GlobalConstant.NAV_SOURCE.FED_POLICY
84-
? this.data.oldData
85-
: this.data.oldData[0];
82+
this.oldData = this.data.oldData[0];
8683
Object.keys(this.oldData).forEach((key: string) => {
8784
if (this.processProfileRuleForm.get(key)) {
8885
this.processProfileRuleForm

admin/webapp/websrc/app/routes/federated-policy/fed-group-details/fed-group-details.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@
232232
[groupName]="groupName"
233233
[resizableHeight]="height"
234234
[useQuickFilterService]="true"
235-
(getSelectedFileAccessRules)="getSelectedFileAccessRules($event)"
236235
(getRemoveProfile)="getRemoveProfile($event)"
236+
(getSelectedProcessProfileRules)="getSelectedProcessProfileRules($event)"
237237
(getEditProfile)="getEditProfile($event)"
238238
(getAddProfile)="getAddProfile($event)"
239239
(getShowPredefinedRules)="getShowPredefinedRules($event)"
@@ -251,7 +251,7 @@
251251
[groupName]="groupName"
252252
[resizableHeight]="height"
253253
[useQuickFilterService]="true"
254-
(getSelectedProcessProfileRules)="getSelectedProcessProfileRules($event)"
254+
(getSelectedFileAccessRules)="getSelectedFileAccessRules($event)"
255255
(getRemoveProfile)="getRemoveProfile($event)"
256256
(getEditProfile)="getEditProfile($event)"
257257
(getAddProfile)="getAddProfile($event)"

0 commit comments

Comments
 (0)