Skip to content

Commit

Permalink
Merge pull request #9963 from abpframework/maliming/ProviderKeyDispla…
Browse files Browse the repository at this point in the history
…yName

Add ProviderKeyDisplayName to permissions modal.
  • Loading branch information
realLiangshiwei committed Sep 3, 2021
2 parents d21544f + 7ce6027 commit f1f827f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
_permissionsModal.open({
providerName: 'R',
providerKey: data.record.name,
providerKeyDisplayName: data.record.name
});
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
_permissionsModal.open({
providerName: 'U',
providerKey: data.record.id,
providerKeyDisplayName: data.record.userName
});
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public class PermissionManagementModal : AbpPageModel
[BindProperty(SupportsGet = true)]
public string ProviderKey { get; set; }

[BindProperty(SupportsGet = true)]
public string ProviderKeyDisplayName { get; set; }

[BindProperty]
public List<PermissionGroupViewModel> Groups { get; set; }

Expand Down Expand Up @@ -51,7 +54,9 @@ public virtual async Task<IActionResult> OnGetAsync()

var result = await PermissionAppService.GetAsync(ProviderName, ProviderKey);

EntityDisplayName = result.EntityDisplayName;
EntityDisplayName = !string.IsNullOrWhiteSpace(ProviderKeyDisplayName)
? ProviderKeyDisplayName
: result.EntityDisplayName;

Groups = ObjectMapper
.Map<List<PermissionGroupDto>, List<PermissionGroupViewModel>>(result.Groups)
Expand Down

0 comments on commit f1f827f

Please sign in to comment.