I have an ECMA script which does following to my site -
1. adds folders to document library and alters permissions to these folders
2. sets site permissions
3. adds existing sharepoint users to the sharepoint user groups
4. adds items to task lists and other custom lists
This script is working fine for me (I'm part of farm admin group). I added an user who has FullControl at site collection level and is a site owner. This user is NOT able to execute the ECMA script - gets access denied in server logs. We want to restrict
the execution of the script to site owners/site collection owners.