'Read out permissions from permission system.'

def populate_initials(self, obj):

    initials = {}
    permission_accessor = get_permission_accessor(obj)
    for model in (Page, PageUser, PagePermission):
        name = model.__name__.lower()
        content_type = ContentType.objects.get_for_model(model)
        permissions = permission_accessor.filter(content_type=content_type).values_list('codename', flat=True)
        for key in ('add', 'change', 'delete'):
            codename = get_permission_codename(key, model._meta)
            initials[('can_%s_%s' % (key, name))] = (codename in permissions)
    return initials
