def get_permission_type(cls, resource_type, permission_name):
        """
        Retrieve permission type enum value for the provided resource type and permission name.

        :rtype: ``str``
        """
        # Special case for sensor type (sensor_type -> sensor)
        if resource_type == ResourceType.SENSOR:
            resource_type = "sensor"

        permission_enum = "%s_%s" % (resource_type.upper(), permission_name.upper())
        result = getattr(cls, permission_enum, None)

        if not result:
            raise ValueError(
                'Unsupported permission type for type "%s" and name "%s"'
                % (resource_type, permission_name)
            )

        return result

        Retrieve permission type enum value for the provided resource type and permission name.

        :rtype: ``str``
        
st2common/st2common/rbac/types.py