Far from a complete solution for your case, but at least a starting point. Look at this blog post from Sebastian Meine:
http://sqlity.net/en/2584/script-database-permissions/[/url]
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]