List Database Permissions - SQL Server

The following T-SQL statement will list all the objects in the database and the permissions for each.

select 
     ObjectName = s.name + '.' + o.name
    ,Permission = p.state_desc + ' ' + p.permission_name
    ,Grantee = dbp.name 

from 
    sys.database_permissions p

    inner join sys.objects o
        on o.object_id = p.major_id

    inner join sys.schemas s
        on o.schema_id = s.schema_id

    inner join sys.database_principals dbp
        on p.grantee_principal_id = dbp.principal_id

where 1=1
--    and o.name in ('MyProcedure', 'InsertUpdateEvent')
    and o.is_ms_shipped = 0
    and o.name not like 'z[_]DeadCode[_]%'
    and o.name not like 'z[_]OldVersion[_]%'
order by 
    ObjectName