'Set who else or which other group can interact with the document.
Example of input: {\'read\': {\'user_ids\': [1, 2, 3], \'group_ids\': [1, 2, 3]}}'

def sync_permissions(self, perms_dict):

    for (name, perm) in perms_dict.iteritems():
        users = groups = None
        if perm.get('user_ids'):
            users = auth_models.User.objects.in_bulk(perm.get('user_ids'))
        else:
            users = []
        if perm.get('group_ids'):
            groups = auth_models.Group.objects.in_bulk(perm.get('group_ids'))
        else:
            groups = []
        DocumentPermission.objects.sync(document=self, name=name, users=users, groups=groups)
