Good day,
I have a question regarding the use of macros. I run a macro whenever a user creates a new folder. This macro executes a report that sets the access for the user. However, I'm not sure how to pass the newly created folder to the report, so currently I set the rights for every folder owned by that user. Long, slow process.
Can anyone please suggest a way to pass the newly created folder from the macro to the report please?
Thank you,
Nevar
Hi Robert,
Thank you for your response. When a user creates a folder, they are automatically given RWD access even if the parent folder is RW. If a user belongs to a UserGroup and has RW access to the parent folder, it will inherit from the parent folder and give RW access via the UserGroup, but the user will still have explicit RWD access to the folder he created.
What we do with the script, is remove the Delete access from the newly created folder. Perhaps that's the wrong way to go about it.
Indeed setting a property is a good idea. I thought perhaps to have access to the Group object itself though. I found some information on an older thread. If this is my macro:
selection = Context.getSelectedGroups();
if(selection.length > 0)
{
reportInfo = Report.createExecInfo("SOME_GUID", selection, Context.getSelectedLanguage());
result = Report.execute(reportInfo, Context.getShowResult());
}
To get access to selection object/variable/data in the Report, it appears I just use ArisData.getSelectedGroups(). I was confused about it cause it didn't seem like that would pass through the right data from the macro to the report. I will try both the property way and the other way and see what works/works best. :-)