@classmethod
    def has_role(cls, permissions, obj):
        perms_for_role = set(cls.class_to_permissions[type(obj)])

        return perms_for_role.issubset(set(permissions))
Check that permission correspond to this role for this object.
dataset/ETHPy150Open kobotoolbox/kobocat/onadata/libs/permissions.py/Role.has_role