Posted: 28 Nov 2018 8:43 EST Last activity: 2 Jan 2019 16:10 EST
OOTB @DownloadFile API should not have an administrator privilege, should it?
I am using an out-of-the-box activity "pxConvertResultsToCSV" in order for user to download a CSV file from a page list on a section. When I test it from Designer Studio with administrator access role, it works, but when I test it from end user portal with limited access role (WorkMgr4) I get a below error.
And I know why; this is because the child activity that gets called, "@baseclass.DownloadFile" has a privilege "zipMoveExport". This out-of-the-box privilege is held only by administrator access role such as SysAdm4, ProArch4, etc. DownloadFile activity is a FINAL and hence, it is not possible to override to get rid of this privilege.
If I do Save As the entire DownloadFile activity and get rid of this privilege, it should work, but this is a very ugly solution. And the parent activity "pxConvertResultsToCSV" has to be also Saved As. Isn't this supposed to be almost a product defect because setting such strict administrator privilege for such generic API is I think too much? => Question #1
Anyways, I need to get this to work - another solution is to give this "zipMoveExport" privilege for end user's access role. Since I am using role dependencies (which was introduced in Pega 7.4), I do not want to clone the entire AROs. So I am adding only @baseclass class ARO with "zipMoveExport" as below screenshot, but is this a right approach? => Question #2
Your feedback is appreciated.
***Edited by Moderator Marissa to update platform capability tags****
Giving the users that need to do the work the privilege sounds like the correct approach to me. The way you are doing it looks fine. Does it meet your needs? Are you having any trouble with it? Otherwise, I think you've done the right thing.