def in_permissions(permissions, value):
    """
    Given a permissions mask, check if the specified permission value is within those permissions.

    :param permissions: permissions set as integer mask
    :param value: permission value to look for

    :type permissions: int
    :type value: int

    :return: is value in permissions?
    """
    return bool(permissions & value)